This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-30
Channels
- # beginners (32)
- # boot (15)
- # cljs-dev (200)
- # cljsjs (1)
- # cljsrn (18)
- # clojure (4)
- # clojure-austin (2)
- # clojure-spec (6)
- # clojure-uk (8)
- # clojurescript (69)
- # cloverage (1)
- # cursive (12)
- # datomic (1)
- # dirac (37)
- # emacs (1)
- # hoplon (38)
- # off-topic (3)
- # om (19)
- # om-next (1)
- # onyx (4)
- # parinfer (2)
- # perun (27)
- # protorepl (4)
- # re-frame (5)
- # rum (9)
- # spacemacs (8)
- # untangled (2)
I want to have a datascript connection available to every component in my tree. In Om.now, I can put the connection in global shared state and access it from anywhere (https://github.com/omcljs/om/wiki/Documentation#get-shared). Is there a way to do this in Rum?
has anyone tried to use dynamic vars with Rum to accomplish something like this? It’s not working for me, but I also could be doing something wrong
@adamfrey: dynamic vars only work in fully synchronous code
It might be more reliable to use component context
There's an example for that in the rum examples I believe. Also there's another example in martinklepsch/derivatives on GitHub
How can I use context with server-side rendering? I am working on a universal app where the client-side uses context.
@martinklepsch I looked into that. How can I pass a custom type that aren’t in PropTypes
? Or can I just pass a function that returns the connection, maybe?