DEV Community

Lavinia
Lavinia

Posted on

What should I learn, React Js or React Native?

Hi everyone! I'm willing to enter the mobile development world, I did some research and I was going to learn React but then I notice that React Native exists, now I don't know what path should I go?
I've been working as a web developer, I love BackEnd more than FrontEnd, but I don't mind to work both parts, I want to develop an app that can work flawless on mobiles but also on desktops.

Top comments (21)

Collapse
 
lukasderksen profile image
Lukas Derksen • Edited

You should look into Progressive Web Apps (PWA). They'll give you the possibility to have all three (mobile webpage, desktop webpage, mobile app) in one. In fact, dev.to is a PWA. You can add it to your homescreen, so that when you open it like that it will look and feel like a native app.

It also has the advantage of not relying on app stores. People can just "install" them from the browser.

Furthermore, to answer your question, I would learn Reactjs. The techniques are largely the same, so if you know one of them by heart, you'll be able to work with the other one as well. The reason I'm suggesting ReactJS is because it's easier to set up the environment IMO.

Collapse
 
seanmclem profile image
Seanmclem

Also since the react CLI, create-react-app, generates a PWA by default. You're most of the way there just by running one command.
github.com/facebook/create-react-a...

Collapse
 
laviku profile image
Lavinia

Hey Lukas, I'm actually learning about PWA and I was wondering if I was losing my time, but now I know I'm on a right path

Collapse
 
lukasderksen profile image
Lukas Derksen

I honestly think PWA will gain ground in the coming years. I can't think of any real reasons to choose native app development over PWA development. By now it has nearly all the possibilities of native apps and none of the hassle of getting them on the stores.

Collapse
 
yiannistaos profile image
Yiannis Christodoulou

Thanks for your suggestion about PWA. I've just found the course "Progressive Web Apps - The Concise PWA Masterclass" in udemy. Do you have any other recommendations?

Collapse
 
seanmclem profile image
Seanmclem • Edited

If you're asking that question, the answer is react. You can't do react native without react. Just do the one. A diversified focus will make it too difficult to learn either. Also, React Native is slowly getting replaced by other things - including ways to just use plain react to make apps instead. Like Capacitor

Collapse
 
laviku profile image
Lavinia

Thanks! I'm going for React then :)

Collapse
 
dragorwyin profile image
Dawid Nowakowski • Edited

Hey there :)
This is my first activity ever here :D
You have mentioned about mobile development, but why not to connect both world and give people better experience?

You can write logic for both: web and mobile and connect it to separate view for mobile and web.
Check this article and repository mentioned there:

codeburst.io/reusing-code-between-...

If you will start experimenting with that and will get any conclusion if it is fine way, I would be happy to get feedback :)

Collapse
 
laviku profile image
Lavinia

Hey! Well thank you! That article really helped me to get some things clear.

Collapse
 
leonlearnsreact profile image
LeonLearnsReact

Hey there! I am no expert, but i started as a junior developer (1. July) and work with React js.
As i was making some investigation when confronted with the topic, my research showed: React is ideal for building dynamic, high performing, responsive UI for web interfaces, while React Native is meant to give your mobile apps a truly native feel.

As React.JS is the heart of React Native, i wooould suggest you start with that, then when you want to build apps that are optimzed for mobile devices, have a look at native.

As mentioned, I am a beginner but that's what i think. :)

Have a great day

Collapse
 
laviku profile image
Lavinia

Thank you Leon, it's very helpful your advice, no matter if you're a beginner, you're actually working on React and that means that you know more than I am :)

Collapse
 
jawwad22 profile image
jawwad22

hi, You can start with anything you like, i started with react native by directly working on live project from scratch, it help me understand working of react and after seeing some tutorial of reactjs, i am able to work on same time

Collapse
 
laviku profile image
Lavinia

Hi! It's just that I read somewhere that if you learn one, then you would find the other one easier, but I couldn't find the article, so I asked here and now I can have this great responses that had helped to clear things out.

Collapse
 
bdbch profile image
bdbch

Depends on what you want to build.

I think React is a lot easier to get into than React Native because of the Toolkit on top of React Native, Simulators and differences between Native Components and simple elements like div in normal React.

Collapse
 
raisaugat profile image
Saugat Rai

React or React-native both require a good knowledge of es6 and javascript. I think the difference is that react-native has it's own component like View, Text, instead of divs and p.
Learning any one of this will benefit both of them in my opinion. :)

Collapse
 
simbo1905 profile image
Simon Massey

Folks are rightly mentioning PWA and building react apps that render on mobile and tablet and desktop. Give that a go. If you look at react native then they go native. The really good sample apps have to recode between ios and android; yet they can go deeper in each. Fiddling around with why a line is duplicated in android but not ios is okay to solve if you are being paid to solve it. If you are tying to learn to build general things then starting with react at PWA is going to cover more ground.

Collapse
 
niorad profile image
Antonio Radovcic

The basic principles of React apply to both. With react-js you can target browsers and mobile via Ionic. Also try to learn a little bit of native development if you want to go deep into mobile apps. It helps you to understand what's going on behind the scenes of react-native and sometimes you just need to dig into native code when something doesn't work with react.

Collapse
 
bybruno profile image
Bruno A.

Hello Lavinia, I believe you should focus first on a platform. Anyway you can reuse a lot of the code on both platforms.

Good studies!

Collapse
 
laviku profile image
Lavinia

Hi Bruno, by platforms do you mean that I should choose between desktop and mobile?

Collapse
 
bybruno profile image
Bruno A.

Exactly, choose between desktop or mobile first and then develop. When you get the hang of the react you go to the next platform.
The question is, is the app mobile an important requirement for the project? If it is, use it first. Otherwise do with React for web. In addition you can work with PWA with Reactjs :D

Collapse
 
joelharkes profile image
Joël Harkes • Edited

Consider flutter? flutter.dev/

It's on top of my list of things I would like to try.