Fork me on GitHub
#re-frame
<
2021-06-09
>
superstructor09:06:00

The todomvc mentioned above is a good simple example. For a more complex example re-frame-10x has an after interceptor for saving db state to a localstorage key and a ::get coeffect for loading data from a localstorage key. See https://github.com/day8/re-frame-10x/blob/master/src/day8/re_frame_10x/fx/local_storage.cljs for the impl and https://github.com/day8/re-frame-10x/blob/master/src/day8/re_frame_10x/panels/settings/events.cljs#L22 for save example and https://github.com/day8/re-frame-10x/blob/master/src/day8/re_frame_10x/events.cljs#L17 for a load example. In retrospect I would probably just rename those save (instead of after) and ::load (instead of ::get ). @nicdaoraf

👍 5
2
anonimitoraf22:06:20

Thanks for the comprehensive info! I'll check it out later :)