As far as I understand, both of the technologies work on Native UI and logic written in JS.
What are the differences in the approach?
Which one is better?
ReactJS will be great for the web, but React Native not much effective for creating the views and constructing the screen layouts. Whereas NativeScript UI definition follows XML syntax which is so easy to follow and it allows ES5, TypeScript for the logic of the application.
React Native uses Virtual DOM to update ReactJS User Interface. It calculates the modifications in the background thread and keeps the User Interface thread as same like before if no changes made. This process makes very responsive UI. But, If the component makes a lot of calls to the native realm, then the app will be slow.
NativeScript Runs JavaScript on the User Interface thread which provides 100% high performance of native platform APIs through JavaScript. Regards,
John, React JS Trainer@ courseing.com/learn/reactjs-online-training
Sriraman
Software Engineer @ LifeOn24
React Native is using the Virtual DOM for updating the UI like React. React Native will calculate the changes in the background thread and keep the UI thread untouched if there is no change. So, UI will be very responsive. But, If the component makes a lot of calls to the native realm, then the app will be slow.
NativeScript is following the classic approach like Android. Running JavaScript on the UI thread allows NativeScript to deliver on one of its core guiding principles: provide high-performance access to 100% of native platform APIs through JavaScript.
Few days back, I have answered a similar question in the Hashnode.
Opinion on React Native and NativeScript