Hi. I have a context based provider which exposes a workflow. When the workflow is called by a child subscribed to the provider's context, I would like to react to error or success. Since component workflows don't support events unlike global actions, I am somewhat stuck. What I'd really like is a React-Like-Effect where I subscribed to an error or success signal from the context and display a toast in the child. Any tips?
Two ideas immediately come to mind:
1. Integrate directly with the Toast provider. This way my provider can directly trigger the toast on error or success. Problem is I am doing this from within a package, so I can't include Spark's Toast context. Other problem is child workflows won't know if error or success.
2. Poll on a variable exposed by the provider context via a recursively invoking workflow. This is totally possible and achieves a React-Like-Effect, but it's a mess to implement each time, and is only simulating reactivity.