Difference between React Js and React Native

Posted By : Mahima Gautam | 27-Oct-2017

Setup and bundling

React-native is the framework, whereas reactjs it's a javascript library that is used for website development. Starting a new project in reactjs, we choose bundler like web packs and figure out which bundle modules is required in the project.But react-native contain everything that is required in the project.It's very easy to set up a project in react-native.We only need to run one command on the terminal.

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.

About Author

Author Image
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.

Request for Proposal

Name is required

Comment is required

Sending message..