This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-09
Channels
- # beginners (140)
- # boot (163)
- # cider (43)
- # cljs-dev (50)
- # cljsjs (5)
- # cljsrn (38)
- # clojure (152)
- # clojure-austria (10)
- # clojure-berlin (9)
- # clojure-dev (11)
- # clojure-japan (1)
- # clojure-miami (2)
- # clojure-russia (147)
- # clojure-sg (12)
- # clojurescript (244)
- # code-reviews (3)
- # cursive (104)
- # data-science (5)
- # datavis (15)
- # datomic (35)
- # editors (4)
- # hoplon (1)
- # ldnclj (11)
- # lein-figwheel (14)
- # leiningen (22)
- # off-topic (53)
- # om (373)
- # omnext (2)
- # onyx (67)
- # parinfer (193)
- # re-frame (23)
- # reagent (89)
- # yada (7)
poking around in the debugger
I don’t know a ton about this, but I think this commit to React Native opens up better packaging possibilities for us in the future: https://github.com/facebook/react-native/commit/8d397b4cbc05ad801cfafb421cee39bcfe89711d
hey guys, when im running set-query! my view gets rerendered with the entire datascript db passed in as a root prop
ive been poking around and am wondering if the root component is expected to look like this? https://www.dropbox.com/s/8hp3asuepv5zi19/Screenshot%202015-12-08%2018.37.25.png?dl=0
here's the fix i have arrived at the for aforementioned problem. ive included some gifs https://gist.github.com/jobez/9ea1963b2b07454a28a6
includes a reproduction case and a different reconciler implemention that seems to fix the issue
Playing with Om-Next for iOS. Obviously compilation fails if I have a require of om.dom
as there is no React.Dom.
I like the idea of cross platform components (browsers and mobile) and I wonder what could be the best way to achieve that? Technically I can create wrapper around all the React components and use it, but hm, there are no span
or div
in RN
Have anybody though about it? It looks kinda possible… I guess
Oh, for om-next render
is just a function. I can put in a different file with different imports. So I would achieve component logic/query/mutation reuse and at the same time have two different renders for different platforms
oh, it’s vice versa - nice
But in any case I like idea of two different renders - likely that mobile and web version would be different
oh not, hm. I have to think about… thanks, I’ll think about this project
Hm, can anybody explain om-next initialisation for RN. At the end of mfikes example:
(om/add-root! reconciler AutoCompleter 1)
(defn ^:export init []
((fn render []
(.requestAnimationFrame js/window render))))
OK, good. But (om/add-root!
accept DOM element as a last argument
The purpose of it is that changes to the app state previously would not cause an automatic re-render. You’d have to click in the UI.
well thanks for explaining this one as well
But as this render is no needed why you have 1
as a last param?
ahhh, it doesn’t matter I guess? RN will find your root component from the AppDelegate
I can only speak to the Om now approach which has (om/root widget app-state {:target 1})
@artemyarulin: React needs to mount on a given element
since there is no DOM in RN
1
is the top-level view
@anmonteiro: Oh, I din’t know about those number, makes sense now, thank you!
at least this is what I've gathered
I haven't tried with a number other than 1
FWIW, I never developed an understanding of it. Once it worked for me, I stopped digging
I guess it’s OK for me, too lazy to dig as well
really stoked on that figwheel setup