Closed asvyazin closed 8 years ago
There is another problem now... Now UI "waits" for final cotransform
to re-render. Let's say you have something like:
performAction SomethingHappened _ _ = do
T.cotransform $ \s -> s { showLoader = true }
lift longAjaxRequest
void $ T.cotransform $ \s -> s { showLoader = false }
then loader will not be shown at all. Should I start another issue?
Thanks for pointing this out. This might be due to a problem in coroutines
actually. We had a similar problem with producers and consumers at one point.
I'll have a look soon, but if you need a solution now, you might want to try switching around the order of the arguments to transformCoTransform
.
This is fixed by https://github.com/purescript-contrib/purescript-coroutines/pull/12
This is fixed in master now.
In some cases two cotransforms in one performAction don't work, second is just ignored
For example insert
T.cotransform id
intoChangeCompleted
action handler in test/Components/Task.purs:And btw two cotransforms work fine in TaskList handlers