Repository: my-expo-app
Describe the bug
When using React Native Strict/Standard ABI together with react-native-css, importing components from:
import { View as ExpoView } from 'react-native-css/components';
results in a TypeScript error because children is not included in the type definition.
Additionally, Strict ABI updates the types of all React Native components in the project itself, but it does not update the types inside the react-native-css library, which creates a mismatch between project components and library components.
Error message
app/index.tsx:12:6 - error TS2322: Type '{ children: Element; style: { flex: number; alignItems: "center"; padding: number; }; className: string; }' is not assignable to type 'IntrinsicAttributes & ViewProps & { className?: string | undefined; }'.
Property 'children' does not exist on type 'IntrinsicAttributes & ViewProps & { className?: string | undefined; }'.
12 <ExpoView style={styles.container} className="bg-red-200">
~~~~~~~~
Reproduction
Expected behavior
ExpoView (and other components from react-native-css/components) should behave like normal React Native components extended with { className?: string }, meaning they should support children out of the box.
Actual behavior
- Types are missing
children.
- Project components get updated types from Strict ABI, but the library components keep outdated types, leading to incompatibility.
Additional context
- The issue happens only with Strict/Standard ABI enabled.
- Without Strict ABI, the app compiles successfully.
- Using
styled(RNView) directly works fine.
- Not sure if the fundamental fix should come from
react-native-css directly or through additional adjustments in Strict ABI support.
Repository: my-expo-app
Describe the bug
When using React Native Strict/Standard ABI together with
react-native-css, importing components from:results in a TypeScript error because
childrenis not included in the type definition.Additionally, Strict ABI updates the types of all React Native components in the project itself, but it does not update the types inside the
react-native-csslibrary, which creates a mismatch between project components and library components.Error message
Reproduction
Repo: [my-expo-app](https://github.com/salemkode/my-expo-app.git)
Steps:
ExpoViewExpected behavior
ExpoView(and other components fromreact-native-css/components) should behave like normal React Native components extended with{ className?: string }, meaning they should supportchildrenout of the box.Actual behavior
children.Additional context
styled(RNView)directly works fine.react-native-cssdirectly or through additional adjustments in Strict ABI support.