Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#259 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react-native, typescript
領域
frontend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
TypeScript
スター
166
フォーク
45
平均マージ
13日 14時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nativewind/react-native-css のほかの issue

nativewind/react-native-css の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。