-
Notifications
You must be signed in to change notification settings - Fork 16
Description
In general it is not allowed to update primitives from an update step. If this happens and two update steps get intermingled it seems we get assertions errors from react.ml
which lead to believe there's a bug in react itself. Can we report better errors while keeping react free of any global data structure ?
Besides better guidelines should be provided on how to avoid that. I think the best way of handling this is through interaction with a monadic concurrency library. Instead of having side effecting events at the outputs of the reactive system we should convert occurences to futures and that future representing the occurence should always and unconditionally immediately defer/yield which will bring the update step to an end (rather than the update step potentially continuing to execute in the future value which may trigger primitive updates and blow the whole system).