React-native: A guide through ReactJs
- Super User
Prabal Parmar
If you are a MERN stack developer then you must have worked with React Framework at any point of time as it is easy to learn and understand. As a web developer you must have thought of learning android or IOS development or at least you could have thought how does mobile apps are made since it is obvious web applications and mobile applications are not the same.
If you want to learn android development then you have many options or you want to learn ios development then you also have some options but wouldn’t it be nice if you can write one codebase and it work for both android as well as ios.
Here comes the role of React-native which is a mobile development framework which can be used to create mobile apps easily as we do with React.
Key Differences between React and React-native
As it is now obvious that both are made on top of Javascript and they are somewhat same but not totally same.
Mobile doesn’t have a cursor so we can’t hover on it. Web apps mainly use HTML for page rendering so React uses tags mainly same as they are in HTML but mobile app doesn’t have and other tags we mainly use other type of tags.
But even if they are different I personally think that tags in React-native are much more simpler than React.
Let’s say we are using
tag for writing some content and in other part of the code we are using tag for same purpose but in React-native you just need to know tag and for writing content.
If you want to wrap content inside a tag in web development you mainly use
In React onClick property is so much important that you could have used it many of the times and we have same property like this in React-native but it differs in name and which is onPress and it’s obvious why it is onPress as on Android or IOS we press the screen same as we click on the computer.
Similarity between React and React-native
First similarity will be that both are made on top of javascript or we can say both uses javascript as their main language so basic functions writing and other things are same as React in React-native.
Hooks which we used to use in React are same in React-native — useEffect, useState, useContext and others also. Their working is also same in React as well as in React-native.
I personally think React and React-native are 90% same and the only thing which differ in both of them are synatx writing and somewhat internal working.
Conclusion
If you are good at Web Development and mainly React then you can also become android developer and also IOS developer by just learning a simple library same as React which is React-native. So, keep learning new skills as there are much more to cover…
