Re:Show HN: Target almost all platforms at once with react n...
by t1amat on Monday January 23, 2017 @03:48PM
(#13465855)
It's the opposite - instead of React Native mapping HTML elements into appropriate native components, websites are just another platform target. You write your components using normal React Native components (Views, Text, ScrollView, etc.) and the `react-native-web` platform converts that into structurally (but not semantically) compatible HTML.
The nice thing is, this is how all platform targets work. It's the platform extension's responsibility to map React Native to their platform. In the case of layout mapping, this typically involves mapping to the `Yoga`[1] layout engine on that platform.
The nice thing is, this is how all platform targets work. It's the platform extension's responsibility to map React Native to their platform. In the case of layout mapping, this typically involves mapping to the `Yoga`[1] layout engine on that platform.
[1]: https://github.com/facebook/yoga