2 ms·
I would love to read a concrete example about these two: > Think like a tree: ignore the book-keeping details and find the cleanest representation. > Think li
by RossBencina 10y ago
I would love to read a concrete example about these two:
> Think like a tree: ignore the book-keeping details and find the cleanest representation.
> Think like a stack: zoom in to the book-keeping details and ignore the structure.
- hex13 10y agoThink like a stack - e.g. take this from 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." http://redux.js.org/docs/basics/Reducers.html#note-on-relationships http://redux.js.org/docs/basics/Reducers.html#note-on-relati... TL;DR Redux docs are telling you "Think like a stack: zoom in to the book-keeping details and ignore the structure."
- hex13 10y agoThink like a tree - e.g. NoSQL databases which allow for keeping hierarchical objects in database (in contrast to relational databases like MySQL).