Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use live_redirect/2 instead of internal data attributes #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeffcole
Copy link

@jeffcole jeffcole commented Apr 8, 2022

The implementation of LiveHelpers.link/1 for the :navigate case was using data attributes (data-phx-link and data-phx-link-state) that are internal to the implementation of LiveView's live navigation.

This change refactors link/1 to use the public LiveView.Helpers.live_redirect/2 to achieve the same behavior.

The implementation of `LiveHelpers.link/1` for the `:navigate` case was
using data attributes (`data-phx-link` and `data-phx-link-state`) that
are internal to the implementation of LiveView's live navigation.

This change refactors `link/1` to use the public
`LiveView.Helpers.live_redirect/2` to achieve the same behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant