Closed xiyler closed 5 months ago
This could also work on something like Derived
if we can verify that its dependencies aren't dynamic (every Derived update doesn't change the dependency tree), and these dependencies are constants.
Deferred to 0.5
It's currently hard to evaluate whether an state object will always evaluate to constant considering dynamic dependencies are supported.
It could be worthwhile to look into make certain state creators (Most notably
Map
) return a constant if its 100% verified that it will always return that constant.If we also applied the idea of #44 on state creators, we could potentially have something like this...
... to be optimized into something simple like this: