Search code examples
clojureclojurescript

How to set and get a vector in local storage?


What would be the idiomatic Clojure way to do this. In js we can use json to stringify the array and then save this in local storage, but I am not sure what would the ideal solution be in clojure.


Solution

  • I am assuming you mean browser local storage.

    You could just (de)serialize your Clojure value as an EDN string.