Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismccord committed Aug 11, 2023
1 parent 0067372 commit 4bc97e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/phoenix_live_view/async_result.ex
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
defmodule Phoenix.LiveView.AsyncResult do
@moduledoc ~S'''
Adds async_assign functionality to LiveViews and LiveComponents.
Adds async functionality to LiveViews and LiveComponents.
Performing asynchronous work is common in LiveViews and LiveComponents.
It allows the user to get a working UI quicky while the system fetches some
data in the background or talks to an external service. For async work,
you also typically need to handle the different states of the async operation,
such as loading, error, and the successful result. You also want to catch any
error and translate it to a meaningful update in the UI rather than crashing
the user experience.
errors or exits and translate it to a meaningful update in the UI rather than
crashing the user experience.
## Examples
## Async assigns
The `assign_async/3` function takes a name, a list of keys which will be assigned
asynchronously, and a function that returns the result of the async operation.
Expand Down

0 comments on commit 4bc97e7

Please sign in to comment.