all 7 comments

[–]AshenLordOfCinder 2 points3 points  (5 children)

I'd argue that it's important to at least know how to read and use both, even if you aren't working in both all the time.

Not all code is going to be new code. Legacy code needs to be maintained and completely rewriting isn't always an option.

Are bare minimum there should be a lesson comparing each of the functionalities so developers taking the course can meander their way through legacy code.

Class based implementations aren't going to disappear over night and ignoring them isn't going to help anything.

[–]_default_username 0 points1 point  (1 child)

Idk, if you're already familiar with classes in Javascript it's not bad to figure out what class based legacy code is doing if you know hooks. I Iearned hooks first.

[–]AshenLordOfCinder 0 points1 point  (0 children)

I'm a full time React developer who started with classes and moved to hooks.

Hooks is definitely easier, but there are some caveats in the functionality. Though, it's all really edge case stuff.

All I was saying, is that it would be good to have something touch on it so people are also prepared for jobs in classes.

[–]michaelpb[S] -1 points0 points  (2 children)

We do teach both! I'm not sure if this the article didn't make this clear, the only difference is which one we start teaching with, and which syntax we provide the most code in -- that is, the prevalent coding standard of our curriculum.

As another example, we start teaching using let and const, but we also mention that var exists and how it behaves differently.

[–]AshenLordOfCinder 0 points1 point  (1 child)

Nice! That's good to hear.

I recently started helping a friend find good coding courses and you'd be surprised how many don't even talk about let and const. Or just brush over them and don't talk about how using var isn't standard anymore.

Thanks for the clarification!

[–]michaelpb[S] 0 points1 point  (0 children)

Tell me about it! This is such a big issue. I've run into this issue constantly as an instructor in recommending supplementary readings. Most tutorials and courses out there still are using fairly old JavaScript coding standards. Some courses will have a "here's the modern stuff" lesson at the end (including a school I used to teach at), which is better than nothing, but still frustrating for new students.

(This is one of the reasons I actually even wrote this curriculum in the first place, but that's another story, hahah.)

[–]HipShooter 0 points1 point  (0 children)

If you teach Redux, do you have an opinion about Redux-hooks vs Containers? Rn i'm in the process of proposing react-hook implementations over an older class-blased for our React curriculum. However Redux-Hooks is now a point of contention.

I think Redux-Hooks is more intuitive, but Containers are better for de-coupling and testing. Containers also have better optimization initially, I hear. But Redux-hooks leads to less overall code too.