Closed jwindridge closed 7 years ago
Hey @authentik8. Glad you're getting value out of this project! And thanks for the suggestion.
I see your use case here, but I am concerned how this will complicate the API when there's a decent user-space solution. I'm also hesitant to encourage dynamically generating entities schemas, as it can make things seem more magical and confusing than it already is.
Closing this issue for now but if you'd like to continue discussing feel free to reopen. :)
First off, thanks for the library - it's brilliant!
Here's my use case as a motivating example:
I'm using normalizr for my schema definitions, and in attempt to prevent boilerplate code, have written the following utility functions to dynamically generate the
update
&transform
keys for my query definitions:This implementation of
collectEntityDefinitions
, while it works, seems a bit hacky/ugly and therefore I was wondering if there was scope forupdate
to optionally take a function instead of an object, where that function would be called with the whole entities state tree & the output fromtransform
?