mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
3c6bf7bf32
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39136 ## Changelog: [Internal] - `getConstants()` method for TM was enforced to only use object literals for the return type specs. This limits flexibility, in particular those data structures can't be consequently exported and picked up by codegen (not even mentioning the potential need for copypasting those obejct literals around). This relaxes this restriction. Note that I've been digging into the development history in order to find out whether there was any particular historical reason for such a limitation, but couldn't find any, so I assume it was rather incidental. Reviewed By: christophpurrer Differential Revision: D48620652 fbshipit-source-id: 92d6ba531fc99fb9b25b4957ae123e7832f44ee4
@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 packages/react-native-codegen.