fern
fern copied to clipboard
Add session storage support with function option
Great work dude. I've never done a pull request before, so please let me know if I did anything wrong in this process, just edited the file on github. Worked on a separate thing I was playing with. Seems this could be the cleanest way to add session storage support without breaking anything for anyone else and keeping it DRY.
forgot to write how to use:
Alpine.persistedStore('this is in', 'localStorage');
Alpine.persistedStore('this is in', 'sessionStorage', sessionStorage);
@ekwoka Can you confirm that these changes work?
@ekwoka Can you confirm that these changes work?
@ryangjchandler This works brilliantly
@ekwoka Could you also update the documentation?
@ryangjchandler done. Should I do the build as well? Is that normal?
Yes please, if you could build and push those files.
@ryangjchandler
Done. I guess you didn't see that I built it a while ago haha