This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-25
Channels
- # beginners (33)
- # cider (40)
- # clara (28)
- # cljs-dev (38)
- # cljsrn (5)
- # clojure (197)
- # clojure-greece (1)
- # clojure-italy (7)
- # clojure-losangeles (1)
- # clojure-nl (10)
- # clojure-spec (32)
- # clojure-uk (154)
- # clojurescript (48)
- # core-async (33)
- # cursive (32)
- # datomic (19)
- # duct (1)
- # fulcro (10)
- # graphql (6)
- # jobs (1)
- # lumo (1)
- # mount (6)
- # off-topic (48)
- # onyx (12)
- # other-languages (2)
- # re-frame (77)
- # reagent (19)
- # reitit (4)
- # ring (5)
- # ring-swagger (18)
- # rum (4)
- # shadow-cljs (52)
- # specter (12)
- # tools-deps (47)
@baptiste-from-paris just remember that the iframe rendering in React is not the same as normal…the js lives in the main page, and it uses iframe like a canvas…so you’re not isolated with comm issues like in normal js apps.
Ok thanks, it should be okay, I just want to use it for design purpose right now
@baptiste-from-paris if you can use React 16, the portal support there might be easier/better
portal doesn’t get you the css isolation, though..it’s just to mount to something in the DOM outside of your tree, right?
I think your options are shadow-dom and iframe…and shadow-dom works well only in Chrome I think
yeah, I'm just saying that before 16 the "portal way" is kinda hacky, the idea was portal + iframes
Probably a bit of an obscure question, but I’m trying to test some things and want to print out the headers that the server receives. I’m using the easy-server (make-fulcro-server). Any tips?
@njj a ring handler should be able to log the headers (and any other part of a request) right?
(defn log-stuff [handler]
(fn [{:keys [header body] :as request}]
(log headers body request)
(handler request)))
(defrecord Logger [handler]
component/Lifecycle
(start [this]
(let [old-pre-hook (fulcro.easy-server/get-pre-hook handler)
new-hook log-stuff]
(fulcro.easy-server/set-pre-hook! handler new-hook))
this)
(stop [this] this))
(defn build-server
[{:keys [config] :or {config "config/dev.edn"}}]
(make-fulcro-server
:parser-injections #{:config}
:components {:logger (component/using (map->Logger {}) [:handler])}
:config-path config
:extra-routes {:routes routes
:handlers handlers}))