TouchableHighlight calls setNativeProps on its child, which is automatically handled by native views but not user-level composite components. In the examples I can think of off the top of my head, you'd typically want a composite component to forward setNativeProps to its root subcomponent i.e. the implementation looks like:
setNativeProps(nativeProps) {
this.refs['root'].setNativeProps(nativeProps);
}
render() {
return <Subcomponent ref="root">...</Subcomponent>;
// If Subcomponent is composite, it will recursively forward setNativeProps
}
I propose this to be the default implementation if a component does not implement setNativeProps. This retains flexibility while I believe behaving reasonably in the default case.
TouchableHighlight calls setNativeProps on its child, which is automatically handled by native views but not user-level composite components. In the examples I can think of off the top of my head, you'd typically want a composite component to forward setNativeProps to its root subcomponent i.e. the implementation looks like:
I propose this to be the default implementation if a component does not implement setNativeProps. This retains flexibility while I believe behaving reasonably in the default case.