fern icon indicating copy to clipboard operation
fern copied to clipboard

Add session storage support with function option

Open ekwoka opened this issue 4 years ago • 7 comments

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.

ekwoka avatar Jul 23 '21 10:07 ekwoka

forgot to write how to use:

Alpine.persistedStore('this is in', 'localStorage');
Alpine.persistedStore('this is in', 'sessionStorage', sessionStorage);

ekwoka avatar Jul 23 '21 10:07 ekwoka

@ekwoka Can you confirm that these changes work?

ryangjchandler avatar Jul 23 '21 11:07 ryangjchandler

@ekwoka Can you confirm that these changes work?

@ryangjchandler This works brilliantly

ekwoka avatar Jul 23 '21 13:07 ekwoka

@ekwoka Could you also update the documentation?

ryangjchandler avatar Jul 23 '21 13:07 ryangjchandler

@ryangjchandler done. Should I do the build as well? Is that normal?

ekwoka avatar Jul 23 '21 13:07 ekwoka

Yes please, if you could build and push those files.

ryangjchandler avatar Jul 23 '21 13:07 ryangjchandler

@ryangjchandler

Done. I guess you didn't see that I built it a while ago haha

ekwoka avatar Jul 28 '21 03:07 ekwoka