Difference between React Js and React Native
Posted By : Mahima Gautam | 27-Oct-2017
Setup and bundling
React-native is the framework, whereas
For running the app we only need Xcode(in iOS and MAC) and android studio(in android) in our system.We can also run that on simulators/emulators of the platform for using it directly in our devices.
Animations and gestures
Through react-native, we can have a completely new way of animating components of an app with javascript.It is recommended
for animating component we should use Animated API provided by react-native.It allows us for creating different animations like timed or animation based on velocity associated to gesture.React-native have provided us with layoutAnimation which is easy to use for any transitions but works for the only iOS.
For interacting with user gestures, it provides the similar thing to javascript that touches the events with web API called PanResponder.The PanResponder is applied for viewing text and images of a component for enabling touch handler on the view.
Platform-specific code
Designing applications for different platforms with same code can be the tedious task to do. By making some assumptions we have to see how we will look and behave, there are two choices:
- Either we can have common design for both the platforms
- We can decide to have a different set of code or DOM, stylesheets and
logics and animations for following in UI and UX guideline of platform. To go with second point, react-native will detect on what platform we are running the code and will place the right code on the right platform.
Working with react-native provides us with ability for using developer tools that are used with reactjs.Chrome dev tools works effectively for inspecting network requests, display console logs and stop code on debugger statements.
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Mahima Gautam
Mahima has a good knowledge of HTML and CSS. She is working as a UI Developer and she loves to dance in her free time.