January 2019
Intermediate to advanced
592 pages
14h 30m
English
When defining a native view, as we did with the ButtonViewManager class, it must extend SimpleViewManager and render a type that extends View. In our recipe, we rendered a Button view, and we used the @ReactProp annotation for defining properties. When we need to communicate back to the JavaScript layer, we fire an event from the native component, which we implemented in step 9 of this recipe.
In step 12, we created an onChange listener, which will execute the event handler passed in from the Android layer (event.nativeEvent.message).
Regarding the use of the nativeOnly option on step 13, from the React Native documents:
Read now
Unlock full access