Change in behavior after 0.19.0 #682
Replies: 1 comment 1 reply
-
This is due to one of the changes documented in the release notes, particularly:
This means that if a synchronous effect has access to a view store, it will not have access to the state that is still being processed by the reducer. We would recommend not injecting view stores into a store's environment, since there's a bit of a cyclical problem there: a view store depends on a store, which depends on an environment. If you make the environment also depend on the view store, you get into cycling territory. Instead of accessing view store state in your environment/effect, you should always feed the current state from the reducer to whatever environment/effect needs it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been using TCA version 0.19.0 and after I updated I noticed a change rewarding reading state from side effects:
This test passes in 0.19.0 but fails in the latest version.
I'm not sure if this is expected? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions