3 ms·
the hearsay is that if you used only components that are available for both, it'd take very little extra boiler plate to get it working on both native and web.
by chii 9y ago
the hearsay is that if you used only components that are available for both, it'd take very little extra boiler plate to get it working on both native and web. But all non-trivial apps have their own components and that's what makes native difficult.
- nathan_f77 9y agoThis is not really true, the react-native-web project provides compatibility for all of the fundamental components that you need, such as View, Image, ScrollView, TouchableOpacity, etc. There are still some missing components [1], but nothing I really needed (or couldn't work around). [1] https://github.com/necolas/react-native-web/issues/91 https://github.com/necolas/react-native-web/issues/91
- zackify 9y agoThis really isn't the case. I have built apps with lots of code reuse on native and web. Abstract all data logic and you can use the exact same code for both apps. This of course does not include your view layer. If you do it correctly, all you have to do is make a new set of view components. Stateless ones. Because you are injecting the state from your non platform specific components. It makes it extremely fast to build for other platforms. It just takes a few apps to fully understand how to abstract these things perfectly.