3 ms·
I remember coming across it fairly heavily in react/redux stuff, mostly because it makes dealing with redux's stores a lot simpler if you avoid nested structure
by kemayo 10y ago
I remember coming across it fairly heavily in react/redux stuff, mostly because it makes dealing with redux's stores a lot simpler if you avoid nested structures like that.
There's a library called normalizr[1], whose purpose is to take nested API responses and turn them into flat structures. Have an article[2] about it.
[1]: https://github.com/paularmstrong/normalizr https://github.com/paularmstrong/normalizr
[2]: https://tonyhb.gitbooks.io/redux-without-profanity/content/normalizer.html https://tonyhb.gitbooks.io/redux-without-profanity/content/n...