Home > @lynx-js/react-rsbuild-plugin > CompatVisitorConfig

CompatVisitorConfig interface

The compat option controls compatibilities with ReactLynx2.0.

Signature:

export interface CompatVisitorConfig 

Remarks

These options should only be used for migrating from ReactLynx2.0.

Properties

PropertyModifiersTypeDescription
addComponentElementboolean | AddComponentElementConfigControls whether to add wrapper elements for components
additionalComponentAttributesArray<string>Specifies additional component attributes list, these attributes will be passed to the wrapped <view> instead of the component.
componentsPkgArray<string>Specifies the list of component package names that need compatibility processing
darkMode?boolean | DarkModeConfig(Optional)
disableDeprecatedWarningbooleanWhether to disable deprecated warnings
newRuntimePkgstringSpecifies the new runtime package name
oldRuntimePkgArray<string>Specifies the list of old runtime package names that need compatibility processing
removeComponentAttrRegex?string(Optional) Regular expression used to remove component attributes
simplifyCtorLikeReactLynx2booleanWhether to simplify constructor calls like ReactLynx 2
Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.