Use public react-native exports instead of deep imports - #523
Open
rubennorte wants to merge 1 commit into
Open
rubennorte wants to merge 1 commit into
rubennorte wants to merge 1 commit into
Conversation
Replace every `react-native/Libraries/*` deep import with the equivalent
public `react-native` export. These paths are outside RN's public API
surface and are going away as the Strict API tightens.
Three of the old imports were suppressed with `$FlowFixMe[missing-export]`
and so resolved to `any`: `Props` (TextInput), `PressEvent` and
`SyntheticEvent`. Now that they have real types, `cacheSelection` in
`createStrictDOMTextInputComponent` no longer typechecks: it declared a
writable `{start, end}` where RN passes a read-only `Selection`, which is
invariant in Flow. Those annotations are now
`Readonly<{ start: number, end: number }>`.
Bumps the minimum React Native to 0.85:
- `unstable_NativeView`, which replaces the `ViewNativeComponent` deep
import, only exists from 0.83.
- `selection` on the text input change event, which the
`selectionStart`/`selectionEnd` polyfill reads, was only added to
`TextInputChangeEventData` in 0.85.
Both packages' `react-native` peer dependency moves from `>=0.82.0` to
`>=0.85.0`, and the example apps move from Expo SDK 55 (RN 0.83.6) to
SDK 56 (RN 0.85.3) so the repo typechecks against the supported floor.
Nothing needed `react-native/unstable-internals-do-not-use`.
workflow: benchmarks/perf (native)Comparison of performance test results, measured in operations per second. Larger is better.
|
workflow: benchmarks/sizeComparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace every
react-native/Libraries/*deep import with the equivalent publicreact-nativeexport. These paths are outside RN's public API surface and are going away as the Strict API tightens.Three of the old imports were suppressed with
$FlowFixMe[missing-export]and so resolved toany:Props(TextInput),PressEventandSyntheticEvent. Now that they have real types,cacheSelectionincreateStrictDOMTextInputComponentno longer typechecks: it declared a writable{start, end}where RN passes a read-onlySelection, which is invariant in Flow. Those annotations are nowReadonly<{ start: number, end: number }>.Bumps the minimum React Native to 0.85:
unstable_NativeView, which replaces theViewNativeComponentdeep import, only exists from 0.83.selectionon the text input change event, which theselectionStart/selectionEndpolyfill reads, was only added toTextInputChangeEventDatain 0.85.Both packages'
react-nativepeer dependency moves from>=0.82.0to>=0.85.0, and the example apps move from Expo SDK 55 (RN 0.83.6) to SDK 56 (RN 0.85.3) so the repo typechecks against the supported floor.Nothing needed
react-native/unstable-internals-do-not-use.