r/reactjs • u/acemarke • Oct 30 '17
Beginner's Thread / Easy Questions (week of 2017-10-29)
Looks like the last thread stayed open for quite a while, and had plenty of questions. Time for a new thread! (I should probably consider labeling these as monthly or something :) )
Soo... Got questions about React or anything else in its ecosystem? Stuck making progress on your app? Ask away! We’re a friendly bunch. No question is too simple.
The Reactiflux chat channels on Discord are another great place to ask for help as well.
22
Upvotes
View all comments
Show parent comment
4
u/acemarke Nov 16 '17
Yeah, my ("our"?) standard advice is to focus on learning React first. Once you're familiar with React, then you'll generally have a better understanding of why a state management lib like Redux can be useful, and how the pieces fit together.
redux-actionsis a neat little lib, but as Dan Abramov said a few months ago:Might be worth not using
redux-actionsat first and writing out actions, action creators, and reducers yourself so you see the way they're used together.The "multiple reducers responding" behavior generally comes into play with slice reducers. Here's a 100% completely un-tested example of how this might work using
redux-actions:So, both the
counter1andcounter5slice reducers are responding to the "INCREMENT" action, separately, and as appropriate for their own slice of state.You might want to check out my "Practical Redux" tutorial series. It assumes you know the basics, and shows some examples of how to build a somewhat more "real-world-ish" type app.