mirror of
https://github.com/react/react-native.git
synced 2026-09-28 13:23:09 +08:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54950 Adds a default case to the switch statement in GenerateEventEmitterH.js to fix compiler warnings about unhandled enum values in upcoming diff ``` [info] buck-out/v2/gen/fbsource/xplat/js/react-native-github/__generate_event_emitter_h-FBReactNativeSpec__/6c08ec662a69b177/out/EventEmitters.h:178:5: error: 'switch' missing 'default' label [-Werror,-Wswitch-default] [info] 178 | switch (value) { [info] | ^ [info] 1 error generated. [info] [2025-12-17T13:42:51.990-08:00] [info] [2025-12-17T13:42:51.990-08:00] Action sub-errors produced by error handlers: [info] - [apple_cxx_error][switch_default] buck-out/v2/gen/fbsource/xplat/js/react-native-github/__generate_event_emitter_h-FBReactNativeSpec__/6c08ec662a69b177/out/EventEmitters.h:178:5 'switch' missing 'default' label [-Wswitch-default] [info] Hint: https://fburl.com/apple_build_errors/missing_switch_default_label [info] [info] BUILD FAILED ``` Changelog: [Internal] Reviewed By: cipolleschi, christophpurrer Differential Revision: D89513261 fbshipit-source-id: c584cd60b6c735f437138db0041d3e0de0015c60
@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.