r/reactjs • • Mar 01 '19

Needs Help Beginner's Thread / Easy Questions (March 2019)

New month, new thread 😎 - February 2019 and January 2019 here.

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. πŸ€”


πŸ†˜ Want Help with your Code? πŸ†˜

  • Improve your chances by putting a minimal example to either JSFiddle or Code Sandbox. Describe what you want it to do, and things you've tried. Don't just post big blocks of code!

  • Pay it forward! Answer questions even if there is already an answer - multiple perspectives can be very helpful to beginners. Also there's no quicker way to learn than being wrong on the Internet.

Have a question regarding code / repository organization?

It's most likely answered within this tweet.


New to React?

πŸ†“ Here are great, free resources! πŸ†“


Any ideas/suggestions to improve this thread - feel free to comment here or ping /u/timmonsjg :)

35 Upvotes

484 comments sorted by

View all comments

Show parent comment

2

u/timmonsjg Mar 12 '19

How do I access the store state once it has been modified by a reducer? Do I need to force the component to re-render somehow?

If the components are connected to the store, they will receive the new props automatically and force a new render. If you have this set and your component is not receiving the new props, there is most likely an issue with your implementation (either with your store or the component itself).

Consider reading the documentation around connect.

2

u/tubehacker Mar 12 '19

Thank you, it makes sense now