LiveRedirect

Deprecation warning

This component has been deprecated in favor of liveview's built-in <.link> and will be removed in v0.13. See https://hexdocs.pm/phoenix_live_view/live-navigation.html for more info and usage

This module is deprecated. Use liveview's built-in `<.link>` instead

Defines a link that will redirect to a new LiveView.

Provides similar capabilities to Phoenix's built-in live_redirect/2 function.

The current LiveView will be shut down and a new one will be mounted in its place, without reloading the whole page. This can also be used to remount the same LiveView, in case you want to start fresh. If you want to navigate to the same LiveView without remounting it, use <LivePatch> instead.


# Public API

Name Description Type Values Default
to Required. The required path to link to.

:string
replace The flag to replace the current history or push a new state.

:boolean false
class The CSS class for the generated <a> element.

:css_class ""
label The label for the generated <a> element, if no content (default slot) is provided.

:string
opts Additional attributes to add onto the generated element.

:keyword []