phoenix_live_view
Advanced tools
Changelog
0.11.0 (2020-04-06)
Remove socket.assigns
during render to avoid change tracking bugs. If you were previously relying on passing @socket
to functions then referencing socket assigns, pass the explicit assign instead to your functions from the template.
Removed assets/css/live_view.css
. If you want to show a progress bar then in app.css
, replace
- @import "../../../../deps/phoenix_live_view/assets/css/live_view.css";
+ @import "../node_modules/nprogress/nprogress.css";
and add nprogress
to assets/package.json
. Full details in the Progress animation guide
phx:page-loading-stop
@foo.bar
only executes and diffs when bar changes@myself
assign, to allow components to target themselves instead of relying on a DOM ID, for example: phx-target="<%= @myself %>"
enableProfiling()
and disableProfiling()
to LiveSocket
for client performance profiling to aid the development processChangelog
0.10.0 (2020-03-18)
@live_view_module
to @live_module
@live_view_action
to @live_action
put_live_layout
is no longer supported. Instead, use put_root_layout
. Note, however, that the layout given to put_root_layout
must use @inner_content
instead of <%= render(@view_module, @view_template, assigns) %>
and that the root layout will also be used by regular views. Check the Live Layouts section of the docs.phx-update="ignore"
hook if data attributes have changed.html.leex
template of the same basename of the LiveView will be automatically used for render/1
live_title_tag/2
helper for automatic prefix/suffix on @page_title
updatesChangelog
0.9.0 (2020-03-08)
:use
on child LiveViewsfalse
in the router and on mountfetch_flash
before):flash
is given as an assignsocket.router
MFArgs
as the :session
option in the live
router macroChangelog
0.8.1 (2020-02-27)
phx-disable-with
on live redirect and live patch linksredirect
on the serverundefined
to string when issuing pushStateChangelog
0.8.0 (2020-02-22)
Phoenix.LiveView.Flash
in favor of :fetch_live_flash
imported by Phoenix.LiveView.Router
@inner_content
instead of invoking the LiveView directly:stop
tuples from LiveView mount
or handle_[params|call|cast|info|event]
is no longer supported. LiveViews are stopped when issuing a redirect
or push_redirect
put_live_layout
plug to put the root layout used for live routesredirect
and push_redirect
from mountphx:page-loading-start
and phx:page-loading-stop
on window for live navigation, initial page loads, and form submits, for user controlled page loading integrationphx-page-loading
to dispatch loading events above when the event is pushedenableLatencySim(milliseconds)
and disableLatencySim()
enableDebug()
and disableDebug()
to LiveSocket
for ondemand browser debugging from the web consoletransport_pid/1
to return the websocket transport pid when the socket is connectedlive_redirect
would reload the current URL instead of the attempted new URLChangelog
0.7.1 (2020-02-13)
phx-change
event to the server in certain casesChangelog
0.7.0 (2020-02-12)
live_redirect
was removed in favor of push_patch
(for updating the URL and params of the current LiveView) and push_redirect
(for updating the URL to another LiveView)live_link
was removed in favor of live_patch
(for updating the URL and params of the current LiveView) and live_redirect
(for updating the URL to another LiveView)Phoenix.LiveViewTest.assert_redirect
no longer accepts an anonymous function in favor of executing the code
prior to asserting the redirects, just like assert_receive
.@live_view_action
in LiveViews to simplify tracking of URL statephx-auto-recover
form binding for specialized recoverylive_patch
and live_redirect
phx-capture-click
to use event capturing to bind a click event as it propagates inwards from the targetphx-key
binding to scope phx-window-keydown
and phx-window-keyup
eventsphx-value-*
on key eventsupdated
hook callbacks on phx-update="ignore"
container when the container's attributes have changedphx-update="append"
raising ArgumentError in LiveViewTestChangelog
0.6.0 (2020-01-22)
mount/2
has been deprecated in favor of mount/3
. The params are now passed as the first argument to mount/3
, followed by the session and socket.handle_params
Changelog
0.5.2 (2020-01-17)
Changelog
0.4.1 (2019-11-07)