Async handling
Introduction
ConanJs gives you a few mechanisms to announce within your actions that you are performing asynchronous operations.
These are the benefits:
NO boiler plate code to update your state asynchronously.
Automatically updates the Monitor Thread to reflect all the async operations running and their details. Allowing you to subscribe to these updates, to easily add loading screens, block buttons etc.
Check our Todos - Async for an example without boiler plate code and which displays the status of the async operations
Allows accessing the underlying ASAPs running at the moment. Note this combined with the ASAPs being cancellable, makes complex scenarios like optimistic updates much simpler
Check our Todos - Optimistic for an example with optimistic updates
Async Actions
There are two mechanisms to declare async actions: auto-bind and monitor actions.
Monitor actions
When you describe your actions, you can access the monitor from the provided thread and the framework will update the Monitor Async thread all the way through the life cycle of the ASAP
Check our Github example to see a monitor example.