Hi
I’m trying to wrap my head around the following concept -
Let’s suppose there’s a config dropdown a user selects (the options are dev
& prod
).
I want to ‘remember’ his selection throughout the session.
When I store it on the socket, it elapses every time the user interacts with the UI and I want to persist it.
I’ve seen a solution using LocalStorage / SessionStorage, but I couldn’t find a way of accomplishing that on the session itself.
What’s the recommended way of achieving that in Phoenix LiveView?
The user that is doing this action is logged in, so I have his id.
(I would love to know what could be done for anonymous users as well, but known users are more important here)
Thanks.