mirror of
https://github.com/status-im/re-frame.git
synced 2025-02-24 15:58:36 +00:00
Merge pull request #392 from Grahack/local-store-todos_comments
Little comment cleaning
This commit is contained in:
commit
3ad035f509
@ -78,9 +78,10 @@
|
|||||||
(re-frame/reg-cofx
|
(re-frame/reg-cofx
|
||||||
:local-store-todos
|
:local-store-todos
|
||||||
(fn [cofx _]
|
(fn [cofx _]
|
||||||
;; put the localstore todos into the coeffect, under key :local-store-todos
|
;; put the localstore todos into the coeffect under :local-store-todos
|
||||||
(assoc cofx :local-store-todos ;; read in todos from localstore, and process into a sorted map
|
(assoc cofx :local-store-todos
|
||||||
|
;; read in todos from localstore, and process into a sorted map
|
||||||
(into (sorted-map)
|
(into (sorted-map)
|
||||||
(some->> (.getItem js/localStorage ls-key)
|
(some->> (.getItem js/localStorage ls-key)
|
||||||
(cljs.reader/read-string) ;; stored as an EDN map.
|
(cljs.reader/read-string) ;; EDN map -> map
|
||||||
)))))
|
)))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user