foundersandcoders / react-week

🔥 React 💧 Week 🌫
20 stars 5 forks source link

Redux #9

Closed sofer closed 5 years ago

sofer commented 6 years ago

Is Redux something that would be useful to add to React week and if so where would we want to put it?

oliverjam commented 6 years ago

I would suggest we shouldn't introduce it in React Week.

Redux is a great pattern, but it's independent of React itself. In my experience learning React + Redux at the same time is confusing, as you end up mixing them up and getting confused about what concepts/syntax comes from which library. @ZooeyMiller might have some insights as this is what he did during our cohort.

The React community seems to be moving away from Redux-by-default too: the prevailing wisdom now is that Redux is overkill for simpler apps and can actually introduce more complexity than it reduces. It's probably something you will have to learn at some point, but it's not a must have as soon as you've learnt React.

Both Ticketmaster interns I've mentored so far have picked Redux up very quickly just by having a good grounding in JavaScript and React. Elm Week also helps as it introduces the pattern and general concepts.

I think it's more useful to focus on teaching React itself really well, since the time is so limited. Whilst Redux itself is relatively simple, using it with React requires understanding of things like higher-order components, which we already don't have time to cover in a single week.

Apologies for the wall of text!

ZooeyMiller commented 6 years ago

I am pretty much in full agreement with Oli.

I think introducing any one specific state management library with react directly isn't a great way to teach. All of the initial small apps people will be working on will be very well served by the standard react API, and it may even lead to confusion (i.e. what is redux even doing for me?).

Also, as Oli says, Redux isn't a default now anymore, and there are a bunch of different state management libraries cropping up.

In short, react should be learned without redux at first, then picking it up later if needed.