3 ms·
So say you want to start a fetch and some animation at the same time to indicate progress. Both run in parallel. Not very unusual use case. How?
by megous 6y ago
So say you want to start a fetch and some animation at the same time to indicate progress. Both run in parallel. Not very unusual use case.
How?
- recursivedoubts 6y agoThere is an example using event-driven control flow that could be used as a basis for this: https://hyperscript.org/docs/#event-control-flow https://hyperscript.org/docs/#event-control-flow Coupled with an async command: https://hyperscript.org/commands/async/ https://hyperscript.org/commands/async/ The language is very young, so we are still building out the docs and examples. For something like htmx, where there is already a rich event model around requests, I would instead listen for htmx:beforeRequest and htmx:afterRequest events: https://htmx.org/reference/#events https://htmx.org/reference/#events And use that event-driven control flow technique to smoothly end the animation.
- megous 6y agoI see, async command would solve that. Thanks.