Hello there!
I would like to address a misleading documentation of Uploads tab of Phoenix Live View guide.
https://hexdocs.pm/phoenix_live_view/uploads.html
Documentation says that @uploads are available at the view in which you used in mount
allow_upload(socket, :logo, accept: ~w(.jpg .jpeg .png), max_entries: 1)
This is fine, but when rendering a form using ModalComponent using helper function live_modal, it do not use the socket.assigns anymore. (code created with mix phx.gen.live)
AppWeb.LiveHelpers.live_modal(socket, component, opts)
which calls
# TODO: Deprecate the socket as argument
defmacro live_component(_socket, component, assigns \\ [], do_block \\ []) do ...
Yes, it turns out socket is not used inside and you need to pass all necessary assigns as a separate argument. Took me around 1.5 hours to understand this.code
I would like to update the documentation of Update page of Phoenix Live View guide, how should I do this?