Closed brunolemos closed 7 years ago
I was thinking about supporting "denormalization" as a separate package https://github.com/paularmstrong/denormalizr. It extends normalizr, so it would be used as a drop-in replacement. However, I'm still working on writing "why" I think it's best to keep it separate...
@paularmstrong official denormalizer would be great! please consider supporting Immutablejs as well.
@paularmstrong they would fit well in the same npm package tbh
import { normalize, denormalize } from 'normalizr';
Doesn't this commit: https://github.com/paularmstrong/normalizr/commit/2522bb91def7f8bae99097f1af462121610188ed
Break your pull request @brunolemos? As such, the code provided still uses getKey()
instead of .key
.
Thanks @fredefl, updated the pull request!
And also found the problem with the 2 tests that were remaining.
It's actually the tests that were wrong, but I'll leave it to @gpbl to check it the change I made makes sense.
when defining a relationship should return the original response
100% working now!
You're absolutely welcome @brunolemos!
I am actually already using your normalizr3 fix to denormalizr, and so far it has been rock solid. Thanks a bunch man!
@brunolemos thanks for your PR and your work 👍
I'm on sabbatical without my laptop until the end of the month, so I'll be slow publishing this. Let me check the changes first :)
Great work, @brunolemos. Thank you very much.
@diegohaz no problem! 🇧🇷
@gpbl :shipit:
Sorry for the delay, I was traveling 🗺
This is published now as v0.5.0.
However, I wonder about this package since @paularmstrong has implemented it in the original module 😅
I was gonna say they don't support immutable by apparently it was added in the last version 😯 https://github.com/paularmstrong/normalizr/releases/tag/v3.2.0
Speaking of which. Is there anything that this package supports that normalizr doesn't? Is it still helpful to keep two packages around that do the same thing?
@paularmstrong
Is it still helpful to keep two packages around that do the same thing?
Not in my opinion 😄 I think this module should be deprecated. People were working on nice features however, such as memoization.
I don't think I'd like to see memoization in normalizr. At Twitter, we use reselect to handle memoization at a higher level.
Yup I don't see its need either. I believe I'll deprecate the package
@gpbl awesome! Don't ever hesitate to reach out! You may also want to wait until paularmstrong/normalizr#238 gets in before deprecating.
~~Hi, it's almost done! 28 tests passing, only 2 remaining.~~ 100% working!
While it's not merged, people can use my fork:
package.json
: