Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Bug Report: `children` type missing when using components import with Strict ABI

Abierto
#259 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
react-native, typescript
Área
frontend

Línea de trabajo

Start with the react-native-css/components entry point, where View is re-exported with a className prop, and check how its props type is built from React Native's ViewProps. Reproduce by enabling Strict ABI in a small Expo app and running tsc on the ExpoView usage in app/index.tsx. Done when children type-checks on the wrapped component without TS2322, and the fix is clear about whether it belongs in the library's types or in the Strict ABI type setup.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

deferred (post-5.0)

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.
Lenguaje dominante
TypeScript
Estrellas
166
Forks
45
Merge medio
13 d 14 h
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nativewind/react-native-css

Todos los issues de nativewind/react-native-css

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.