Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Learn JS first. It does have some quirky aspects but a lot of them are more like scissors given to a child - not automatically dangerous, but quite likely to end up causing harm. There's also something of an obesssion with inlining as much code as possible, this might be satisfying to write but it's a fucker to read.
Then, once you're resigned to that mess, tackle React. JSX isn't really that bad, but again, it doesn't always incentivise writing neat code.
Things like hooks you can treat like a black box, don't worry too much about how they work, they just work.
Also, realise that data flow is objectively difficult and the reason we have a different fad each month is because nobody has stumbled on *THE* way to do it. Your first few attempts are probably going to get tied in logic knots. Just bin them and start again, you're always learning.
Can't really point you to a good place to learn but avoid any documentation with words like 'awesome', 'blazing fast' etc. It isn't.
h3rp1d3v44567dThe official doc is deprecated.
Try remix, follow the tutorial and see what react app should look like.
The worst thing about react codebase is legacy redux syntax with ugly class components. Maybe just skip redux and context API. People write the most ugly shit with those. Use react query instead.
It's easier to treat react as a language instead of a library
@h3rp1d3v I suggest learning it because there are quirks which won't make sense if you haven't. I can't think of any other languages off the top of my head where you instantiate functions and treat them as objects routinely (especially when there is a class keyword - and this addition is, I agree, nonsense) - a function component and the hook lifecycle only make any sense when this is known. Otherwise I do agree, React is better treated as a language of its own, but I do think I'd have been buggered if I hadn't already been writing JS for years.
@h3rp1d3v even as a functional language it is a bit of an outlier, mainly because (and React is kind of testament to it) we're always trying to implement other paradigms in it - there is rarely a warning that 'What you are about to read IS fucking mental but it's where we ended up', so I think it's easy to assume a failure to understand something when no, what you're reading is actually pretty crazy.
Figure it's probably easier to take one lunatic on at a time, that's why I suggested learning (at least a little) JS in isolation. Maybe it's better to just take it all on the chin, I dunno.
Compared to what languages? and if you say Python i'm about to delete this thread