slouchpie
`live_session` breaking `sticky: true` Live View
Greetings comrades,
I have discovered that “sticky” LiveViews get remounted (breaks stickiness, resets state) when live navigating to a route that lives in a different live_session in the router.
I made a repo here to demonstrate the problem:
https://github.com/peaceful-james/adhesive
I do not know if this is expected behavior or a bug.
If it is expected then I will open a PR to add this vital information to the docs (Phoenix.Component — Phoenix LiveView v1.0.0-rc.6).
If it is a bug then I will open an issue in the live_view github repo, maybe even have a go at fixing it myself (hold my beer).
Marked As Solved
slouchpie
I see at least one other person is already aware of this limitation:
Maybe this is in the docs and I just missed it?
UPDATE: Yup, I’m blind:
Redirecting between
live_sessions will always force a full page reload and establish a brand new LiveView connection.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








