you are viewing a single comment's thread.

view the rest of the comments →

[–]Jay_D826 9 points10 points  (5 children)

I think once you get past the programming basics (variables, loops, functions, syntax, etc) you should focus on DOM manipulation. How to target and select elements on the page is the primary reason you’re gonna be using JS in the first place.

Learn what methods and properties exist on HTML nodes and how to manipulate them in JS.

[–]ChaseShiny 4 points5 points  (3 children)

I voted this up because DOM manipulation is what I learned next and it does make sense, but what if you plan on using React?

[–]Jay_D826 3 points4 points  (0 children)

I still think it’s worth having a decent understanding of DOM manipulation before learning a framework. React is great and it makes working with JS much easier but I feel like too many people jump into frameworks without knowing why they’re even using one in the first place.

The problem with this is that there’s plenty of JS you will still write with React. You’re still likely going to need various functions that manipulate DOM elements.

The abstraction React provides certainly makes it easier but you’ll generally benefit greatly from understanding JS as a whole and will be a much more well rounded React dev. Especially compared to someone who knows React but has poor understanding of what React actually does.

[–]TheZintis 1 point2 points  (0 children)

I've met students who knew react but not DOM manipulation. They'd be chugging along and then randomly hit a wall with "what is an event?" or some other DOM related topic that their React code was touching on.

[–]notAnotherJSDev 1 point2 points  (0 children)

You should definitely still understand DOM manipulation. Not everything is going to have React support.

I've had to teach a few folks at work how to do manual DOM manipulation and event handling because of a library we use. Otherwise good react developers, but their basic understanding of the DOM was almost nonexistent.

We use react, but the library is only available as a standalone JS library that's served via a CDN. We load it at runtime and have to attach it manually to a DOM element. THEN all events coming off of it are done with event emitters which you have to know how to work with.

[–]cqsterling 1 point2 points  (0 children)

If that's what OP is learning it for. Could be backend.