mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
1aca74586f
Summary:
This diff adds support for spreading view props into the generated viewconfig (currently hardcoded the view viewconfig but soon that will also be generated)
Results in a generated view config such as:
```
const ReactNativeViewConfig = require('ReactNativeViewConfig');
const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
const BooleanPropNativeComponentViewConfig = {
uiViewClassName: 'BooleanPropNativeComponent',
Commands: {},
bubblingEventTypes: {
...ReactNativeViewConfig.bubblingEventTypes
},
directEventTypes: {
...ReactNativeViewConfig.directEventTypes
},
validAttributes: {
...ReactNativeViewConfig.validAttributes,
disabled: true
}
};
ReactNativeViewConfigRegistry.register(
'BooleanPropNativeComponent',
() => BooleanPropNativeComponentViewConfig,
);
module.exports = 'BooleanPropNativeComponent';
```
Reviewed By: TheSavior
Differential Revision: D15258778
fbshipit-source-id: 2c70d20dc366f32a8114d42e0e15b5f1e359d11f