4 ms·
Very basic question: am I thinking of these the right way? React.js is the view layer of a web app/page. ReactNative is a whole framework for making an app (th
by michaelbuckbee 10y ago
Very basic question: am I thinking of these the right way?
React.js is the view layer of a web app/page. ReactNative is a whole framework for making an app (that you could call back to a database, do some logic on the data and display it to the user.)
Is that right?
- lojack 10y agoReact.js is the view layer for a website, ReactNative is the view layer for a native app. In both instances you could call back to a database, but React doesn't provide any of those abstractions. Neither is really a full featured framework, and both focus on the View.
- michaelbuckbee 10y agoThank you. My point of reference was Appcelerator Titanium: which is a js, cross-platform framework. Is ReactNative a "view" for something like that? Or are they pretty similar.
- lojack 10y agoSomeone else may be better at explaining the differences than me, as neither are my area of expertise. My understanding is that they both provide a view layer, and Titanium provides more of an everything-included framework so you don't have to touch any native code. With React, it provides an easy to use view layer that helps you create compositions of components and layouts, but it's expected at some point you'll want/need to build things in native code. It's also expected that the overall architecture of the app to be provided by the developer. This gives more flexibility to break out of React or add it to existing projects where its helpful. Without having more experience with Titanium, its hard for me to say if you can use ReactNative along side it, but my gut says they probably have a different way of doing things.
- mambodog 10y agoReact is a view-centric component system. It's primarily used for view-related stuff, but the component abstraction is pretty powerful, so they can be useful in lightweight cases for application structure too (YMMV here). React Native is a system of bindings of native APIs to Javascript. This includes bindings which allow you to use native UI elements just like you would use divs, inputs etc. for React on the web, but it also includes bindings for common mobile OS APIs like geolocation, camera, maps, etc.