mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
5b5e150eaf
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46751 rubennorte noticed that some turbo module methods were not getting cached on the jsRepresentation as expected. This is caused by the react-native-codegen wrappers we generate overriding the `get` method and bypassing this caching layer. Instead they should be overriding `create` to lazily allocate new properties. To prevent this from re-occuring, I've made `get` final so no other overrides can happen. ## Changelog: [General][Fixed] Properties for C++ TurboModules using codegen were not correctly cached [General][Breaking] TurboModule::get is now a final method, override `create` to customize property lookup Reviewed By: rubennorte Differential Revision: D63665966 fbshipit-source-id: c614901c2f0d698147ec9ba36a4b592ed3d37652