Ask HN: How do you manage state in your React application?
11–20 of 47 posts
Re: Ask HN: How do you manage state in your React application?
#12Re: Ask HN: How do you manage state in your React application?
#13I think “how you shape your state to make it easy to reduce and share between components” is an important topic that’s taken a backseat when discussing state management tooling.
Should I repeat my backend models? Should I use a redux ORM? How much should I denormalize or normalize?
I found it much easier to just denormalize everything and shape state for presentational purposes, e.g, I have a bunch of page nodes in my redux state each with a duplicated header. If I need to make an update to the header in response to, say, a change in user email, I change each duplicated header individually.
Sounds insane but it really works for me and let’s me keep more business logic in the backend where it belongs.
Re: Ask HN: How do you manage state in your React application?
#14Re: Ask HN: How do you manage state in your React application?
#15Re: Ask HN: How do you manage state in your React application?
#16Re: Ask HN: How do you manage state in your React application?
#17Re: Ask HN: How do you manage state in your React application?
#18Re: Ask HN: How do you manage state in your React application?
#19Re: Ask HN: How do you manage state in your React application?
#20react-apollo is very interesting to me, but my understanding is that we'd need a graphql compatible backend, which we don't have