This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-28
Channels
- # announcements (11)
- # aws (30)
- # beginners (98)
- # calva (11)
- # cider (42)
- # clj-kondo (4)
- # cljdoc (1)
- # cljsrn (5)
- # clojure (132)
- # clojure-europe (4)
- # clojure-ireland (1)
- # clojure-italy (35)
- # clojure-japan (2)
- # clojure-nl (5)
- # clojure-spec (5)
- # clojure-uk (24)
- # clojurescript (71)
- # clojutre (1)
- # core-async (6)
- # cursive (9)
- # data-science (4)
- # datascript (3)
- # datomic (78)
- # duct (16)
- # emacs (14)
- # events (2)
- # fulcro (141)
- # graalvm (5)
- # hoplon (14)
- # hyperfiddle (2)
- # jobs-discuss (14)
- # joker (8)
- # luminus (2)
- # off-topic (7)
- # om (1)
- # pathom (4)
- # pedestal (7)
- # planck (2)
- # quil (1)
- # re-frame (14)
- # reagent (2)
- # reitit (14)
- # robots (1)
- # shadow-cljs (20)
- # spacemacs (25)
- # specter (1)
- # sql (122)
- # tools-deps (63)
- # unrepl (2)
- # yada (34)
What do you all do when users hit the Reload button, and it blows away your app-db? Is there an elegant approach to preserving state across reloads?
Ah, that's interesting, I'll look into that, thanks!
I was thinking of hooking into onbeforeunload
and persisting to local storage, but just wondered if there was something else people were doing.
Here’s one use-case: my app embeds an iframe to a 3rd-party app, and sometimes the 3rd-party app gets into a bad state, and you want a reload without losing your work in the main/host app.
:thumbsup:
usually I only need to persist a subset of the actual app state. so what I do is write to local storage on mutation
but the onbeforeunload sounds nice too, since it won’t slow down your app while it’s running
@manutter51 could you put a reload button on the iframe?
We’ve got one actually, but you know muscle memory — you think reload, and boom Cmd-R and you’re done.