Keep In Mind
kea-waitfor in not (YET!) designed to be used in listeners. Only use it outside your logic,
like in tests or in a Server Side Rendering context.
However, if you're feeling lucky and use it anyway in a listener, remember to add a
breakpoint after the wait!
First install the
Then install the plugin:
To wait for a kea action, use
To wait for any random condition, use
To wait for multiple actions to finish, use
Promise.all like you would with other
To wait for the first action to finish, use
To add more metadata to better detect the winning action, feel free to
.then(...) to the promises:
To wait with a timeout, use a makeshift timebomb: