This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-28
Channels
- # admin-announcements (1)
- # aleph (3)
- # bangalore-clj (4)
- # beginners (167)
- # boot (14)
- # cider (4)
- # cljs-dev (24)
- # cljsjs (21)
- # cljsrn (33)
- # clojure (214)
- # clojure-greece (2)
- # clojure-italy (2)
- # clojure-korea (16)
- # clojure-russia (29)
- # clojure-spec (31)
- # clojure-uk (86)
- # clojurescript (144)
- # core-matrix (2)
- # cursive (37)
- # datascript (5)
- # datomic (104)
- # devcards (2)
- # events (2)
- # jobs (2)
- # luminus (8)
- # midje (1)
- # nyc (4)
- # off-topic (1)
- # om (39)
- # om-next (1)
- # onyx (47)
- # perun (1)
- # planck (6)
- # proton (2)
- # re-frame (25)
- # reagent (40)
- # spacemacs (9)
- # vim (71)
- # yada (3)
I've spent the weekend just modeling my backend with datomic so the pull queries against the data match the data on the client. now trying to figure out how to wire the om.next client with the server
transit is a good choice
especially since you're dealing with clojure on both ends
For posterity’s sake on (https://clojurians.slack.com/archives/om/p1479413311007034): I posted here a little while back about seeing really high CPU util from FireFox and that I had traced it down to some GC and Render stuff going on. What made this unique was that Chrome had no such problems. I was able to narrow down the errant code later that day, but am still on the hunt for the Chrome vs Firefox question. Turned out, in the CircleCI Om code that we had a little something like this going on:
(reify
om/IWillUpdate
(will-update [_ something _]
(when (something-booleany? something)
(om/set-state! owner [:this-is-cool-yeah?] "woah boy!"))))
Changing this to first check that the owner’s state hasn’t been set dropped CPU util down to comparable between Chrome and FireFox. Changing this entire thing to be under IWillReceiveProps
was an even cleaner solution (and ultimately where this should have been to begin with). Why this is a different issue between the two browsers, I do not know, but this is what I’m aiming to figure out.
For those interested in the actual code, have fun! https://github.com/circleci/frontend/commit/c787a719bc73ba9b62f414e71bd276194a637ee2Hi folks, I (a ClojureScript noob) am struggling with the following:
I want to use this library: [cljsjs/react-grid-layout "0.13.7-0"]
and have included it in my project and imported in my namespace. I have the following code to create a ReactGridLayout component: (def GridLayout (js/React.createFactory js/ReactGridLayout))
but I get errors in my console saying that ReactGridLayout is not defined... Can anyone point me in the right direction to solve this problem. I have no clue how to solve this.. 😖
:thinking_face: Thanks for your response. Do you know in which namespace I can look for it?
that require assumes it's inside the ns
macro, in which case you do not need to quote the vector
Thanks for the tips. I have required react-grid-layout and also tried grid/ReactGridLayout
instead of js/ReactGridLayout
, but that also didn't work for me.
The library is being included <script type="text/javascript" src="http://localhost:8080/js/out/goog/../react-grid-layout.inc.js"></script>
, but somehow ReactGridLayout
is still not defined..
I was using om version 0.8.8, I am now updating to the bleeding edge version... Maybe that will solve my issue..
I'm working with a toy om.next app to learn about it. I have a page with a couple of divs which I want to make into Tabs with goog.ui.TabPane. I was only able to get this to work by adding the root component and then creating the Tab:
(om/add-root! reconciler RootView (gdom/getElement "app"))
(TabPane. (gdom/getElement "Root")) ; "Root" refers the rendered RootView
I.e. The TabPane constructor is called outside of any component's (render) method. How can I do this inside a Component?
Can I pass a component as the arg to TabPane? Or how else do I identify the container to create a TabPane from, since (gdom/getElement "Root")
seems to be nil until after the render is done.I thought about doing the (TabPane. ...) in the RootView components' componentDidMount() method. Not sure if that will work or is the recommended approach. I'm going to try it?
you could create a React wrapper around the tab pane, which would mostly consist of lifecycle method manipulation.`(TabPane. React.findDOMNode(this))`
componentDidMount works! But is that the recommended approach. Seems non-obvious to me, but I'm also new to front-end development, as well as Om dev.