mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Set runtime config provider for the Template (#39633)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39633 This diff sets runtime config provider for the template. It sets `native` to `false` to prioritize static view configs over native view configs. Changelog: [Breaking] - Set runtime config provider for the Template. Reviewed By: luluwu2032 Differential Revision: D49604628 fbshipit-source-id: 0ea19eb76fc67d0df862b82ec4b9d172ae92d56d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
af7bf9371c
commit
2de964cfd2
+9
@@ -6,4 +6,13 @@ import {AppRegistry} from 'react-native';
|
||||
import App from './App';
|
||||
import {name as appName} from './app.json';
|
||||
|
||||
if (global.RN$Bridgeless) {
|
||||
require('react-native/Libraries/NativeComponent/NativeComponentRegistry').setRuntimeConfigProvider(
|
||||
name => {
|
||||
// In bridgeless mode, never load native ViewConfig.
|
||||
return {native: false, strict: false, verify: false};
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
AppRegistry.registerComponent(appName, () => App);
|
||||
|
||||
Reference in New Issue
Block a user