Skip to content

Commit

Permalink
Add note about live methods in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
woutdp committed Sep 5, 2023
1 parent d9eba0a commit baf97ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ The following methods are available on `live`:
- `upload`
- `uploadTo`

These need to be run on the client, they can't be run in SSR. Either make sure they're called on an action (e.g. clicking a button) or wrap them with `onMount`.

More about this in the [LiveView documentation on js-interop](https://hexdocs.pm/phoenix_live_view/js-interop.html#client-hooks-via-phx-hook)

#### Create a LiveView
Expand Down

0 comments on commit baf97ee

Please sign in to comment.