|
|
|
|
|
by gorbypark
1748 days ago
|
|
React-native-web is more or less a component library that re-creates react-native's API. Some will disagree, but react-native's API is much nicer and cleaner than HTML and CSS. It's like they took the best parts of HTML and CSS and left out the 30 years of cruft. The idea is that since react and react-native API's differ so much, it's not really feasible to have one code base cover native and the web. React-native and react-native-web allow you to use the same code. I'd say I'm at about 90-95% code reuse. You can throw in little platform specific changes inline (Platform.OS === "web" ? <This> : <That>) or use platform specific extensions for things that really differ(MyComponent.android.js, MyComponent.ios.js, MyComponent.web.js or MyComponent.native.js for example). |
|
If you’re not making an app would you still use react native web over old stool react for the reasons above?