shirakaba / react-nativescript

React renderer for NativeScript
https://react-nativescript.netlify.com
MIT License
280 stars 14 forks source link

Use CustomNodeHierarchyManager for all components with a custom node hierarchy #36

Closed shirakaba closed 4 years ago

shirakaba commented 5 years ago

This would:

  1. clean up the Host Config, and;
  2. would make it clearer how to produce more complex UI plugins;
  3. also allow subclasses of any NativeScript View to inherit the custom node hierarchy management code of the corresponding React component that they'd naturally extend, thanks to the mixin pattern I've come up with.
shirakaba commented 4 years ago

RNS v1 solves this with NativeScript Vue's registerElement() API:

https://github.com/shirakaba/react-nativescript/blob/1a11127ed70194cbeb0b45be9dc38b2b9930251c/react-nativescript/src/nativescript-vue-next/runtime/registry.ts#L172-L174