This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-09
Channels
- # announcements (1)
- # arachne (1)
- # beginners (34)
- # boot (5)
- # calva (68)
- # cider (34)
- # cljs-dev (1)
- # clojure (36)
- # clojure-italy (8)
- # clojure-spec (16)
- # clojure-uk (58)
- # clojurescript (29)
- # cursive (2)
- # datascript (9)
- # datomic (3)
- # emacs (10)
- # figwheel (1)
- # figwheel-main (11)
- # fulcro (33)
- # luminus (5)
- # mount (2)
- # nrepl (42)
- # off-topic (3)
- # other-languages (2)
- # parinfer (3)
- # perun (4)
- # prelude (3)
- # re-frame (6)
- # reagent (5)
- # shadow-cljs (23)
- # sql (37)
- # testing (1)
it means using the same code on the server and client. like react does https://github.com/DavidWells/isomorphic-react-example so having a single component that is rendered on the server and on the client. on the first page load, it is rendered on the server and then SPA takes over
well, you can render a Hiccup template easily enough, and I think the subscription system works. so if the server supplies an app-db, it should be practical to do an initial render. the hard part would be adjusting the app as shipped to have it attach to the already-created DOM instead of rerendering it. I have no idea how hard that would be.
that can be done through react-dom/hydrate
. I’ve already done that part. but I was thinking more about subs and dispatch.. I guess I just have to play around with it
well, subs and dispatch don’t make a whole lot of sense on the server-side. if you’re just filling in the initial state, it’ll probably work