Rick Hanlon
1aca74586f
Update view configs handle view props/events
...
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
2019-05-16 10:51:06 -07:00