This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # beginners (84)
- # boot (21)
- # cider (12)
- # cljs-dev (13)
- # cljsrn (3)
- # clojure (169)
- # clojure-dusseldorf (2)
- # clojure-gamedev (6)
- # clojure-germany (1)
- # clojure-russia (15)
- # clojure-serbia (4)
- # clojure-spec (16)
- # clojure-uk (4)
- # clojurescript (51)
- # core-async (1)
- # datomic (23)
- # emacs (16)
- # figwheel (1)
- # fulcro (60)
- # hoplon (8)
- # lein-figwheel (3)
- # leiningen (1)
- # luminus (4)
- # lumo (43)
- # off-topic (4)
- # re-frame (17)
- # rum (37)
- # shadow-cljs (21)
- # test-check (13)
- # vim (14)
specifically #3: rum.core/defcs is used instead of rum.core/defc. It allows you to get hold of the components’s state in the render function (it will be passed as a first argument).
I am pretty certain you need to instantiate the component for this to be available, but i am but a newbie and you should really ask @tonsky
Thanks we spotted that, but we want to get that data without instantiating the component, like om.next’s static methods
@jfntn what's the static equivalent in om.next? the dereferenced atom value?
I don't know if I get what you need, but maybe I can help, since I am doing some rum today (=
I’m looking for an implementation strategy for something similar to om.next’s collocated queries
We’d like to somehow “annotate” the component with its query, and retrieve that query without having to mount the component first
not mixins, but you could maintain a UI tree in parallel, these 2 concepts are smashed together in om.next... maintaining yet another structure in parallel sounds like an easy way to overcomplicate way down the line
So just create a protocol and attach it to the function, then write some macros to get a nice DSL.
if I remember correctly we actually let you specify meta on fn and carry it on into the resulting component
Meta sounds best because we’d like this to work with SSR, I’ll try that and report back
That makes sense. Yes, you'd want to keep something addressable in play before components are initialized. That data must come from somewhere, I wonder what the nicest way to integrate it is.
I have a question, is the typical refresh loop timer set to 1 second ? (1000 ms) and ... do you guys tweak this? i'm curious about long-term browser cpu usage, maybe it's not a real concern, i did some profiling in the browser and it seems all righty...
@tonsky unfortunately it looks like
defcs don’t preserve the meta set on the name
so in your serverside code you can have the "do this if it's we're in a clj world, this other line if we're in cljs land"
How do you nest components in rum? Like "big component has 9 tiny components inside" ?
@jfntn I remember there has been some work to support meta on vars in cljs. Not sure the status