re: React Beginner Question Thread ⚛ VIEW POST

FULL DISCUSSION
 

What are the best practices to organize state in Redux. I notice the we left many objects orphans inside the state and also some objects inside other objects. I know tat this is a poorly coding, but when teams are getting bigger seems to happen more. I was thinking to use something like minimongodb or other tools to validate objects. Is this a moronic idea?

 

Try to see how big apps using Redux organize their state (using Redux DevTools or by looking at storeState of connected components in React DevTools). For example Mobile Twitter.

I think in general instead of nesting you’ll want to normalize the data and keep it relatively flat. I wrote a library for this that was rewritten and is now maintained by Twitter: github.com/paularmstrong/normalizr

I don’t know what minimongodb is and I don’t understand what you mean by validating or orphan objects.

 

Minimongodb is a mongodb that is used in app that uses meteorjs. I was thinking introduce a db for the state so I can keep it normalize.

code of conduct - report abuse