necolas / react-native-web

Cross-platform React UI packages
https://necolas.github.io/react-native-web
MIT License
21.69k stars 1.79k forks source link

[WIP] Add TS support to react-native #2702

Closed fabioh8010 closed 3 months ago

fabioh8010 commented 4 months ago

TODO

codesandbox-ci[bot] commented 4 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3ff7d9f718e8a9b278eed89ffffcf763b5d6fd86:

Sandbox Source
react-native-web-examples Configuration
blazejkustra commented 4 months ago

Awesome work @fabioh8010! Let's update the description to address why the PR is needed in the first place, and post it here and here to gather some 👀

necolas commented 4 months ago

I'm not going to merge and maintain a separate set of TS types. Sorry

blazejkustra commented 3 months ago

I'm not going to merge and maintain a separate set of TS types. Sorry

That is fine, thanks for letting us know 😄

blazejkustra commented 3 months ago

This PR can be closed now, as we just added TS definitions for RNW and extended RN types in DefinietlyTyped repo.

Installation

Simply install the types with npm run install --save-dev @types/react-native-web and supply react-native-web as a member of the types compiler option:

{
  "compilerOptions": {
    "types": ["react-native-web"]
  }
}
fabioh8010 commented 3 months ago

Closing as per discussed above, we will create a PR with the instructions to this repo soon!