News for hackers. Stuff that matters.
Re:Ask HN: Where to start with getting back into front end? by schwartzworld on Wednesday June 30, 2021 @05:39AM (#27686646)
The basics are the same as they've been for a long time. You can easily build a working front end app using html/css/js in a single file. Build a few projects so you can familiarize yourself with modern apis without the burden of tooling.

Once you've built a few small projects, hopefully you'll have a sense of the pain points modern frameworks fix. Most people use global variables for state or even store their state in their html and then use JS to update the html. Modern frameworks do it differently, asking you to manage state and then creating a view as a function of that state.

If you do go the react route don't confuse yourself by using redux. People associate them so heavily they even refer to it as "learning react/redux". I've never seen a great use case for redux in the wild and believe it to be an antipattern. I've never written a redux reducer, but I've removed hundreds of lines of redux code, always to the betterment and simplification of the app.

You can form your own opinions later, but I really recommend learning to build react apps without global state, learning the basics like props, hooks, event bubbling, etc. Then if you ever need safe, immutable global state you can learn redux.

Re:Ask HN: Where to start with getting back into front end? by joshxyz on Wednesday June 30, 2021 @06:46AM (#27687025)
Our team uses hooks only, as we found classes distasteful. Most projects can be built without redux, too. React + tailwind goes a long way, lol, but yea redux has its own use case if and only if you need it
Re:Ask HN: Where to start with getting back into front end? by schwartzworld on Wednesday June 30, 2021 @07:25AM (#27687242)
I don't think hardly anyone uses classes anymore, but classes vs hooks are implementation details. The important thing is the react compositional model, and it's easiest to learn that without any other tooling.

I'm sure redux has a few use cases, but the primary use case I've seen is "I've coded myself into a corner and I don't want to refactor anything."