scalable-react / scalable-react-boilerplate

:star: Scalable feature-first React micro-framework made for Udacity Alumni collaborative projects
https://scalable-react-boilerplate.herokuapp.com/
MIT License
259 stars 60 forks source link

How about normalise state ?? #69

Closed thonymg closed 7 years ago

thonymg commented 7 years ago

In the redux documentation ...

In a more complex app, you're going to want different entities to reference each other. We suggest that you keep your state as normalized as possible, without any nesting. Keep every entity in an object stored with an ID as a key, and use IDs to reference it from other entities, or lists. Think of the app's state as a database. This approach is described in normalizr's documentation in detail. For example, keeping todosById: { id -> todo } and todos: array inside the state would be a better idea in a real app, but we're keeping the example simple.

QraphQl can do this job or we need to use normalizr ?

Thanks

RyanCCollins commented 7 years ago

Hey @thonymg, sure! This sounds like a great opportunity for a pull request! If you get around to it, feel free to submit it and I'd be happy to merge it in!

Thanks!

RyanCCollins commented 7 years ago

Hey @thonymg, I have closed this issue but feel free to reopen it at any time if you get back to it.