mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
5aa425c086
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42125 This diff changes how numeric types are generated for Objective-C native modules. Before this diff: |Codegen Type|Objective-C Type| | -- | -- | |number|double| |Float|double| |Double|double| |Int32|double| After this diff: |Codegen Type|Objective-C Type| | -- | -- | |number|double| |Float|**float**| |Double|double| |Int32|**NSInteger**| Changelog: [iOS][Breaking] - Codegen: mapping for numeric types is changed for Objective-C native modules. `Float` -> `float`; `Int32` -> `NSInteger`. Reviewed By: cipolleschi Differential Revision: D52479442 fbshipit-source-id: 1b2e101a9593a75c7c19b0da3a01a0e592a35ba5
@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.