LiveView's start_async helper for arbitrary async operations
LiveView 0.20 ships with a new
start_async/3 function that makes it so easy
to perform arbitrary async operations!
We saw LiveView’s
assign_async helper in a previous video, but sometimes we
want an arbitrary async task. Ideally, we’d like to get the same process
isolation and error handling that we get with
Well that’s what
Define a task with
start_async/3 and then handle the success and error cases
handle_async/3. LiveView will take care of the rest! 🤩
You can read more on the async operations section of the docs.