5 points · by 3000 · 3y ago · 6 comments
anyone have a recommendation for a simple cookie, localstorage, session etc library that works well with it?
[1] htmx.org
grateful for any replies!
For authenticated users, just store a user pref record on your database. For state that is not linked to a user account, use the standard session mechanism of your backend. Alternatively, just use good-old functional cookies, with the Set-Cookie HTTP header. Set them to be available to javascript if needed.
(on the backend im using php and arangodb.)
if you do want to do some client side stuff, Alpine.js is a popular and lightweight option