fly-apps / live_beats

MIT License
1.26k stars 159 forks source link

Use `live_redirect/2` instead of internal data attributes #49

Open jeffcole opened 2 years ago

jeffcole commented 2 years ago

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.