Migrate native spec imports to the public React Native API
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, react-native
Direzione di ricerca
Start with src/specs/DateTimePickerNativeComponent.js and compare its React Native imports with the public Codegen exports documented in the issue. Then inspect the remaining native module specifications for private React Native imports and check the supported React Native versions before deciding whether the minimum version needs to change. Done means the specifications use supported public imports with their existing annotations and defaults preserved, and the compatibility implications are addressed.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
@react-native-community/[email protected] uses private React Native imports in its native component specification. The current upstream specification still contains these imports.
React Native introduced its Strict TypeScript API in 0.80 and enabled it by default in 0.87. React Native documents public package-root exports for Codegen types and helpers as the supported migration path.
Affected imports
In src/specs/DateTimePickerNativeComponent.js:
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet';
import type {
BubblingEventHandler,
Double,
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
Suggested change
Use the public package-root exports:
import type {ViewProps, ColorValue, HostComponent, CodegenTypes} from 'react-native';
import {codegenNativeComponent} from 'react-native';
Update the specification's numeric, event-handler, and default-value annotations to CodegenTypes.Double, CodegenTypes.Int32, CodegenTypes.BubblingEventHandler, and CodegenTypes.WithDefault, preserving their existing signatures and defaults.
Please check the remaining native module specifications for private React Native imports as part of this migration, and account for the library's supported React Native versions when deciding whether a minimum-version change is needed.
Scope and compatibility
- Library version: 9.1.0
- Target React Native version: 0.87.1
- Scope: native specification import migration, not a platform-specific picker runtime failure.
- This particular component specification is Flow source. This report does not claim that a normal TypeScript consumer necessarily typechecks this
.jsfile or fails merely by importing the library; it requests migration away from the private paths to the documented public API. - This report is based on source inspection. No standalone reproduction repository is attached.
References
- React Native Strict TypeScript API and Codegen migration guide
- Equivalent public-import migration proposed for react-native-safe-area-context
AI disclosure: GitHub Copilot assisted with researching and drafting this issue
- Lingua principale
- JavaScript
- Stelle
- 2.9k
- Fork
- 459
- Merge medio
- 4g 16h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di react-native-datetimepicker/datetimepicker
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
-
DateTimePickerAndroid.open() throws "Cannot read property" error on RN 0.78.3 new architectureAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
react-native-datetimepicker/datetimepicker#1047 · 6 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Tutte le issue di react-native-datetimepicker/datetimepicker
Issue simili
-
Administration: required plugin configuration field stays invalid after restoring its saved valueApertaneeds-triage Platform(Default)
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
nearform/ag-grid-url-sync#314 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
idean3885/claude-ops-agent#910 ·
I maintainer di solito rispondono entro 1 giorno
-
S: triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
oskarrough/agent-ide#29 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno