Open foxdonut opened 3 years ago
@foxdonut have you investigated how to fix this?
@pygy yes, see the last line of my description above, there is a link to a commit showing how I fixed it in simple-stream
. I figure the fix should be similar in mithril stream.
Thanks, I'll have to dig into that then :-) (unless you beat me to a PR)
@pygy here is a working flems based on @foxdonut example. I tried making a PR, but with other changes in the next
branch were beyond my wizardry to make play nice together.
Mithril version:
2.0.4
Browser and OS:
Chrome on Mac OSX
Project:
Meiosis
Steps to Reproduce
update
streamstates
stream byscan
ning the `update streamstates.map(state => effect(state)
whereeffect
triggers anotherupdate
Expected Behavior
effect
function to be called again{ route: 'Home', routeChanged: true, data: [] }
{ route: 'Home', routeChanged: false, data: [], loading: true }
{ route: 'Home', routeChanged: false, data: [ 'duck', 'quack' ], loading: false }
Current Behavior
effect
function is not called again{ route: 'Home', routeChanged: true, data: [] }
{ route: 'Home', routeChanged: false, data: [], loading: true }
effect
function should have been called again, but it is not.Context
This is to set up the Meiosis pattern with Effects.
Note: This commit fixes the same issue in Meiosis-Setup's
simple-stream
.