Skip to content

Enable the RN Strict TypeScript API #101439

Open
6 of 6 issues completed
Open

Description

@roryabraham

Problem

RN 0.80 made the Strict TypeScript API opt-in. We are not using it. RN 0.87 enables it by default.

Solution

While we're waiting for Expo SDK 58 to stabilize, let's work on opting-in to the Strict TypeScript API.

Issue OwnerCurrent Issue Owner: @collectioneur

Activity

  1. roryabraham commented on Sep 17, 2026

    @roryabraham
    ContributorAuthor

    I'm wondering if maybe we should try to land #99495 first. It's proving to be a bear of a PR

  2. roryabraham commented on Sep 21, 2026

    @roryabraham
    ContributorAuthor

    Looks like there's a skill specifically for this npx skills add react-native-community/skills --skill migrate-to-strict-api. I'll give it a spin

  3. roryabraham commented on Sep 21, 2026

    @roryabraham
    ContributorAuthor

    Bailed out. React Native 0.86 opt-in produced 2944 errors across 420 files, so the Strict API is not enabled.
    Kept the dual-compatible rewrites (5 deep imports moved to react-native root exports; NodeHandle and HardwareBackPressEvent inlined). Typecheck passes.
    Still blocking a later attempt:

    • ReactNativeStyleAttributes in src/components/AlwaysPaintedView/index.native.tsx — private, no root export
    • Removed types: AlertStatic, CellRendererProps, ViewToken, ViewabilityConfig, ImageResizeMode, TextInputPasteEventData
    • Widespread style/*Instance ref mismatches

    react-native-safe-area-context is 5.6.2; Strict API needs >= 5.8.1. Feedback thread: react-native-community/discussions-and-proposals#1015

  4. 1 remaining item

  5. roryabraham commented on Sep 21, 2026

    @roryabraham
    ContributorAuthor

    Created sub-issues to break down the scope of the change.

  6. roryabraham commented on Sep 22, 2026

    @roryabraham
    ContributorAuthor

    Opened PRs for all the sub-issues that need them. One sub-issue was bogus, another was a dupe

  7. roryabraham commented on Sep 24, 2026

    @roryabraham
    ContributorAuthor

    Happy to hand this off while I'm mostly OOO the next few weeks. @collectioneur do you want to take it? I got us started but AI has been really bad so far at finishing it or even being clear on the scope.

    It does seem like web compatibility is a wrinkle that makes this harder, so it might be the case that landing #99495 would make this easier (though that's been hard to land in its own right, but I think it's independently valuable).

  8. roryabraham commented on Sep 24, 2026

    @roryabraham
    ContributorAuthor

    This isn't technically a blocker for the RN 0.88 bump (we can still explicitly opt out), so I'm making this a weekly

  9. collectioneur commented on Sep 30, 2026

    @collectioneur
    Contributor

    Yes, I can take this on. I'm currently updating the dependencies required to upgrade React Native to 0.88, so I'll start working on it as soon as the required libraries are migrated 🙌

  10. mountiny commented on Oct 15, 2026

    @mountiny
    Contributor

    @collectioneur how is this looking?

  11. collectioneur commented on Oct 16, 2026

    @collectioneur
    Contributor

    I looked into migrating the repo to the strict ts API about a week ago, and it seems like quite a big task. Once I wrap up the gesture handler hook migration, I'll get started on it (early next week) 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions