3 ms·
Yeah, I'm trying to figure out how React and React Native relate. Are they similar enough that a React app can be modified to "go native" fairly easily? Like le
by pbreit 10y ago
Yeah, I'm trying to figure out how React and React Native relate. Are they similar enough that a React app can be modified to "go native" fairly easily? Like let's say you were building Slack which has web and desktop apps that appear identical. Could/would you use React/React-Native and this IDE?
- afontaine 10y agoFrom what I understand, you can't just "go native" from ReactJS because React Native uses specific components for mobile. While you can't just port over, the way you think about components and your API endpoints can be re-used. It's also nice that they both work with components which allows for less "context switching."
- leoalves 10y agoMost of the logic can be the same. But the UI is different. For the web it uses html elements and for native uses native ios/android elements. Even android and ios are different. That's the biggest advantage if compared to Adobe Cordova. A lot more performant
- jjnoakes 10y agoIt isn't about whether the underlying ui is different or not. Of course it is. It is about whether the source application code can be the same. Today it isn't. But why not create a set of source compatible components that render to Android, iOS, and HTML? I've seen projects approach this and I think it is a good idea. You get the typical lowest-common-denominator problem but if you have a decent way to mix in platform-specific elements where required, what is the downside?
- grayrest 10y agoThey're using the same core library and conceptually work the same way but there's no no out-of-the-box unified widgets allowing you to share view code between both. So you can share your controllers, model, viewmodel, and higher order data binding components but you'll be rewriting your views.