mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
7490ad4a21
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/34796 This diff introduces the generation of custom native states using basic types as we do with the Props. To make it work, the custom types are already writte in the Props.h file, therefore the State.h file must import that other file to have access to the required types. This diff adds and updates the tests for the State. ## Changelog [General][Added] - Generate custom Native State Reviewed By: cortinico Differential Revision: D39816763 fbshipit-source-id: 42d1aa9a6df23145f4a46ae8ccfb43d81fa651fb
react-native-codegen
Installation
yarn add --dev react-native-codegen
Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like
Testing
To run the tests in this package, run the following commands from the react Native root folder:
yarnto install the dependencies. You just need to run this onceyarn jest react-native-codegen.