I’m new to Phoenix LiveView and after reading a few threads here, I still find it hard to understand whether it’s possible to keep socket assigns when changing pages.
Let’s take as an example the awesome LiveBeats project. When you navigate around the website, the sidebar assigns will get refetched even though it uses assign_new. Because the moment you do a live redirect the nav on mount gets called and the socket assigns is empty.
It is not possible to do this with live_redirect. Refetching the side bar assigns would be just the same as if it were a regular static site too.
If you want something closer to the “single page app” architecture you can use a single live view page, with a main component on each page in addition to a nav component. Then you live_patch between routes and change out the component.