DEV Community

Miguel Rodriguez
Miguel Rodriguez

Posted on

How much JavaScript should I be familiar with before getting into React?

Hi, I began to learn HTML, CSS, and JavaScript for front end development a month ago. I consider myself a JS beginner, so far I have only completed freecodecamp's JavaScript course about oop, algorithms and data structures.

How much JavaScript should I know or which JS concepts should I be familiar with before getting into a JS framework like React?

Discussion (11)

Collapse
dance2die profile image
Sung M. Kim

Hi Miguel. I'd like to use this analogy.

Kind of like you don't know have to everything about English to speak English, you can learn just enough to be able to "speak JavaScript" to get started.

The more you know inner workings of JavaScript, the more you will be able to know but not necessary to "get into React".

Collapse
stereobooster profile image
stereobooster • Edited on

Three time this. I don't get this vibe (which I see not first time): "you need to learn thing A before you start to learn thing B".

In reality I keep learning constantly. It would be nice to have roadmap, but sometimes it is hard to predict what would you need next.

The confusing part of React, is not React (in my opinion), but ecosystem. You may be confused by bundlers (webpack, parcel), by JSX. So demystify those you can try to write react application without it - old school html and script tag. Nobody would write real life application that way, but at least you would understand how it works without tooling.

In order to work with React you need to understand (at least): functions (as values), closures, variable scopes, event loop, immutable operations (there are no native immutable data structures, but people workaround using spread operator).

As well, you can try to build your own react or build hooks from scratch.

Collapse
miguelrodoma95 profile image
Miguel Rodriguez Author

Hey, thanks a lot to both of you! My plan was to start with React tutorials and toy projects right now but I read some stuff of people saying that I should not get into frameworks before really knowing JS.

Getting into it now and learning as I build stuff sounds practical and really good for me.

Thanks guys!

Collapse
dance2die profile image
Sung M. Kim • Edited on

Nice one 🙂👋, @stereobooster for the well explained reply

Collapse
jdheywood profile image
James

As much as you know now, just get started and you'll learn along the way.

Obviously the more you know the more likely it is you'll have fewer wtf moments, but don't let your current level of experience stop you from trying things out and learning.

You got this!

Collapse
miguelrodoma95 profile image
Miguel Rodriguez Author

Thanks!

Collapse
ahferroin7 profile image
Austin S. Hemmelgarn

As much as reasonably possible. The better you understand JavaScript itself (and the Web API's), the easier it will be to learn to use React, or Svelte, or whatever other framework you choose.

On top of that though, having a solid understanding of how to do things in JavaScript without needing to use a front-end framework makes you a much better JavaScript developer. It means you'll be more likely to understand any arbitrary JavaScript code you come across, it makes it easier to work around issues you might have with whatever front-end framework you sant to use, and it means you'll have an easier time understanding how the framework actually works (which in turn helps you avoid bugs).


That said, unless you have some reason to learn React specifically, I'd encourage you to look instead at Web Components. They have far less overhead than a conventional front-end framework, are usually more portable, and still provide the main thing most people want a front-end framework for (reusable UI components.

Collapse
miguelrodoma95 profile image
Miguel Rodriguez Author • Edited on

Thanks a lot, I do have a reason to learn React but I'll definitely get familiar with Web Components first, maybe that'll give a more general insight on the concept than getting straight to the framework.

Collapse
stereobooster profile image
stereobooster

For fullness of picture, not every web developer shares idea of web components, for example dev.to/richharris/why-i-don-t-use-....

Time will show who was right.

Thread Thread
ahferroin7 profile image
Austin S. Hemmelgarn

Indeed, and even I don't feel that they're a silver bullet. I do, however, feel that they don't get mentioned anywhere near enough, hence my making a point to mention them here (and I think they're a better introduction to the concept of the shadow DOM than most of the UI frameworks that make use of it are, since you actually have to use it yourself with Web Components, you end up with a better understanding).

As far as 'who was right', I suspect the answer will end up being somewhere in-between. Web Components definately have their issues, but so does every UI framework out there.

Collapse
codelitically_incorrect profile image
codelitically_incorrect

Javascript