Andrew Shaffer
Andrew Shaffer
@troch Ya, but right now all components have access to context. Would you not pass context to all components? You maybe could say that if a component doesn't export a...
@rstacruz You may want to take a look at [state-lens](https://github.com/ashaffer/state-lens) and [redux-ephemeral](https://github.com/ashaffer/redux-ephemeral). The state lens thing is just sort of a rough idea, but it works.
@rstacruz Ya, I know that's a problem. I'm planning on allowing you to mixin getProp/setProp to redux-ephemeral to support that use-case. I'll try to get that up today or tomorrow.
@troch Maybe I am missing something...Let me give some examples. If I have: - N components and each of them exports a `getProps`. Then on every re-render, `getProps` needs to...
Ya, I understand that context makes the immutable approach impossible. I guess I should have been more clear: I was suggesting that maybe the fact that context makes the immutable...
I think I misspoke slightly. You can memoize not just the component by its props/state, but its entire subtree if you don't have a general context.
@troch What does the DOM tree look like in that test? Render times don't make much sense absent that context.
@anthonyshort I think i'm in favor of that as well. The main downside then is that local state becomes substantially more explicit, although that may be ok. I think it...
I made a quick demo of the idea above: [state-lens](https://github.com/ashaffer/state-lens). It's probably not the optimal way of implementing it, but it works to play around with.
Hmm...in thinking more about this, what if rather than a `getProps` which does an arbitrary transformation of state, we did more like an `observe`, which returned the paths that this...