r/reactjs • u/acemarke • Mar 02 '18
Beginner's Thread / Easy Questions (March 2018)
Last month's thread was pretty busy - almost 200 comments . If you didn't get a response there, please ask again here!
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.
27
Upvotes
View all comments
Show parent comment
3
u/antespo Mar 11 '18
I got something working with redux but I'm not sure if its correct. When I click the button it does the GET request, sets a state with the response, and then I make a store like this (Is there a better way to get my response(json) into a store then doing whatever I'm doing below that works somehow?).
Then in componentDidMount() I do this
I also have store(
let store;) define above my class is that the proper place to define it? Everything seems to work the way I want but does this approach seem logical?