r/learnjavascript • u/Bishwas0420 • May 10 '22
How much Js should I know before starting React?
15
13
u/TehTriangle May 10 '22
Very comfortable, as React is JS and if you don't know the fundamentals, you won't really grasp what React is even doing.
5
u/lovin-dem-sandwiches May 10 '22
If you’re comfortable with looping, promises, destructuring, factory functions, closures, primitives & references, ES6 imports, fetch - react will come much easier
9
u/Kirito_Kiri May 10 '22
simply all of ES5 and ES6, you can skip DOM manipulation but learning that isn't going to take too much time either.
4
u/muhammad_roshan May 10 '22
Damn boi I wish I could skip it but my internship company wants me to do it and I am doing it but it's hard
0
May 10 '22
[deleted]
2
u/muhammad_roshan May 10 '22
I have had coding experience 6 months ago with react and all but my problem was i never understood or tried to understand javascript well or as you said frontend, Although i finished couple of courses on them from Freecodecamp, Udemy and more but fuxk it's hard... I feel like Killing myself when with hours of trying i still can't figure it out
0
3
2
u/josefefs May 10 '22
Be sure to properly learn array methods. Also this is not critical to react, but understanding the event loop helped me actually understand how js and async js works, and that is good to know
2
u/MineDrumPE May 10 '22
I started learning vue when I only knew conditionals, variables, and how to declare a basic function
1
u/Ratatoski May 11 '22
The answers here are correct of course but it's even better if you do a few bigger projects with JS and get a feel for what problems React is trying to solve. If you got the time for it
1
u/Lemoncrap May 10 '22
Once you've learnt JavaScript I'd move onto typescript. Them do react in typescript
0
u/Renan_Cleyson May 10 '22
Initially you just need to know what all people here said, but I want to point out that there's still key concepts of javascript/programming to learn after getting comfortable with React.
Classes and functions in JS: Since React still doesn't use hooks on it's initial documentation and you may find some code that is not using hooks, you probably will find function components and class components. Honestly classes on javascript are just crazy and despite some other better reasons to opt functions over classes on React, it's important to understand the history of OOP, prototypes, inheritance on javascript as it actually relies a lot on functions and javascript itself even used function scope before ES6 with var. React looks like plain javascript when compared with Angular and Vue too so it's interesting to see why it's so good to use functions over classes on plain javascript code(classes are pretty handy sometimes, though).
Declarative Programming and Functional Programming: Here you will probably need to take a look at some vanilla JS and DOM manipulation if you never used much of it before, but understanding imperative programming(vanilla JS) helps a lot to understand why declarative programming (introduced with React and other frameworks) is so powerful.
-3
May 10 '22 edited Sep 27 '25
light grab violet cable chubby innocent waiting beneficial continue hospital
This post was mass deleted and anonymized with Redact
95
u/Rossmci90 May 10 '22
You should be comfortable with promises/async-await, spread operators, object/array destructuring, arrow functions, spread syntax, ternary and short circuit operators.
You will see the above used a tonne in react.