rum

Simple, decomplected, isomorphic HTML UI library for Clojure and ClojureScript | 0.12.8 https://github.com/tonsky/rum/blob/gh-pages/CHANGELOG.md#0128
2019-10-12T21:53:48.001800Z

Any recommendations for deeply threading values from the root to all child components? Specifically, I'm trying to pass a DataScript conn to mixins so that my components can add a mixin like ... (with-tx ::on-create-todo my-tx-fn)

cjsauer 2019-10-16T21:21:22.005700Z

@samcferrell have a look at react context: https://reactjs.org/docs/context.html

cjsauer 2019-10-16T21:27:41.006Z

Static properties in rum work like this FYI:

(def MyContext (react/createContext))

(rum/defc my-component
  < {:static-properties {:contextType MyContext}}
  ...)
That tripped me up when following that react guide.

2019-10-17T15:03:29.006400Z

thanks! is that context API available in the version of React that rum provides?

2019-10-12T21:54:23.002700Z

Right now the workaround is simply referencing a globally shared reference to the conn atom from within the mixin