Back
Post
am i using react wrong?
picture a simple app with logged in users. each button click / form submit Iβm just changing a value on the user database schema.
what Iβm currently doing is each time i render a new component i run component did mount and fetch the data i need from the backend api.
then update the state and display it. this just seems wrong. surely using redux properly can solve some of my problems? what should i be doing?
what Iβm currently doing is each time i render a new component i run component did mount and fetch the data i need from the backend api.
then update the state and display it. this just seems wrong. surely using redux properly can solve some of my problems? what should i be doing?
π Join WIP to participate
Hmm this might be a better question for Stack Overflow because of its community (and it was made for this!), but I want to mention that I'd be wary of injecting Redux without good reason.
It's really useful for sharing state amongst your components, but it adds significantly more boilerplate.