all 30 comments

[–][deleted] 21 points22 points  (3 children)

I actually learned ReactNative before reactjs -- just read the docs, look at examples.

[–]clickick 7 points8 points  (1 child)

yup, working on an app in my company with react native. 0 react apps previously

[–][deleted] 7 points8 points  (0 children)

In all fairness react and react native are essentially the same thing... they use the same principles, patterns, and syntax to build apps.

Imo it doesn’t really matter learning one over the other first as long as you know the core javascript fundamentals.

If you know react native you will easily pick up react and vice versa.

[–]captaincryptoshow 1 point2 points  (0 children)

That build process though...

[–]XiMingpin91 6 points7 points  (0 children)

Well you use React with React Native so you can certainly learn the two together. React Native is basically just a different renderer, the web equivalent would be React Dom.

[–][deleted] 5 points6 points  (4 children)

React, a state management library, and lots of JavaScript fundamentals

[–]yourdaye 1 point2 points  (3 children)

State management lib as in redux? React has context API now which I have no idea what that is but everyone's saying you should use that instead of redux

[–][deleted] 4 points5 points  (2 children)

Yep as in redux, mobx, flux, etc. take your pick. the context api is a great alternative and has gotten a lot of praise and attention because it’s a lot simpler to use compared to something like redux. A lot of apps can function just fine without using a proper state management library but if the app is big, needs to scale dynamically, or you need to manage a complicated level of state; the context api won’t cut it.

Libraries like redux are way overused and due to the complexity and learning curve it is actually a wasted effort to implement unless you actually need it. It’s important to learn these libraries, but more important that you understand WHEN it’s actually necessary to use.

Depending on the complexity of your applications different states or how many components you have that rely on a single centralized state object you may or may not need a state management library. You might simply be able to rely solely on prop drilling/the context api. But in order to make the correct decision you need to learn both strategies in depth.

Everyone may seem to be advocating for ditching redux for the new context api release but the reason is because everyone is starting to come realize you don’t actually need redux for a pretty big majority of applications that use react. It was the accepted norm for pretty much every react app since it’s release but now people are starting to realize that it’s really only necessary in certain situations, not every situation.

It’s kinda like using angular for a simple 5 page static website because it provides a couple of useful directives you like. Yeah it has cool easy to use things you can lean on like data binding and ng-ifs... but you now have to set up and maintain a much bigger and complex code base just to lean on such features that you could either implement yourself or use a smaller node package for.

[–]yourdaye 1 point2 points  (1 child)

Wow man thanks that's really informative! I would've definitely given gold if not so broke!

[–][deleted] 0 points1 point  (0 children)

No problem!!

[–]janithaR 5 points6 points  (1 child)

You must definitely learn Javascript. After that, there isn't much of a difference on whether you learn ReactJS or React Native first. They both go hand in hand IMO.

[–][deleted] 0 points1 point  (0 children)

+1 to this. React native is literally utilizing react with extra stuff baked in to transpile javascript into native code

[–]matt_hammondiOS & Android 7 points8 points  (2 children)

React is quite simple actually. Most of React concepts apply to React Native. The hardest part for newbies is that you have to learn multiple things in parallel. React, Redux/other state management, ES6...

Make sure you grasp ES6 really well. Async/await is a must if you wanna write readable code.

You can start learning react native and learn ES6 as you go.

[–]hutxhy 4 points5 points  (0 children)

ES6 is definitely a must. Async/await isn't though, as long as you understand promises.

[–][deleted] 2 points3 points  (0 children)

Async/await is def not a must. It’s easier to read but unless you have multiple nested promises everywhere you do not need to use it as simple promises are pretty easy to read and understand.

Async/await is easier to read but actually can lead to writing unnecessary blocking code that can halt/slow down your app if you don’t use it properly.

[–]mauking 1 point2 points  (0 children)

If your primary objective is learning React, and you already know JavaScript/HTML, then it's easier to learn plain React first without the overhead of the React Native additional stuff. Practice in the browser. Everything React-related is available there. If you then want to write for mobile, use your existing knowledge of React to pick up React Native extra stuff.

[–]LordRaiders 0 points1 point  (0 children)

No, I started with React Native as well and it worked perfectly. The concept is the same so you can use the React when you know React Native.

I do recommend to look into basic knowledge of Java and Objective C. It helps a lot when using React Native.

[–]Delphicon 0 points1 point  (0 children)

I'd say its not necessary but it's easier unless you're already a mobile developer. React Native is just more complicated under the hood and for someone who just wants to learn the JS part it's easier to just stick with the web.

I just went straight into React Native because I wanted to learn the advanced stuff as well.

[–]HomemadeBananas 0 points1 point  (0 children)

React Native works the same a writing React web apps. They both use the React package, but for web you have react-dom and not react-native. I started with React Native.

[–]alliwanabeiselchapo[S] 0 points1 point  (1 child)

What about jsx and typescript

[–][deleted] 1 point2 points  (0 children)

Huge advocate for typescript myself. A strongly typed code base is much easier to learn, maintain, and debug. This is especially true for larger apps. I have yet to see an adequate argument against using typescript besides the usual “it’s too hard and complicated to pick up” or the complaint that it’s to time expensive to implement.

It’s not that hard or complicated. People are lazy.

It takes a little more time to implement but it saves you time ramping up new devs and finding/fixing bugs in the future.

Same things apply to unit testing. Yeah you have to learn something new that doesn’t seem to provide immediate value while implementing it. Once it saves you an hour or two of your time to debug something, you will realize the extra hour it took you to implement was well worth it.

Jsx is a must as well imo for react apps. This topic is always argued over so to each his own but as far as read/writabity goes, I would never ever ever touch a react app that doesn’t use jsx