This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-09
Channels
- # admin-announcements (1)
- # boot (225)
- # braid-chat (1)
- # cider (25)
- # cljs-dev (35)
- # cljsrn (1)
- # clojars (6)
- # clojure (81)
- # clojure-berlin (1)
- # clojure-dev (21)
- # clojure-france (2)
- # clojure-japan (6)
- # clojure-poland (1)
- # clojure-russia (10)
- # clojure-uk (3)
- # clojurescript (121)
- # code-reviews (1)
- # core-async (4)
- # core-logic (2)
- # cursive (15)
- # datomic (8)
- # hoplon (4)
- # jaunt (112)
- # jobs-discuss (35)
- # om (41)
- # parinfer (8)
- # re-frame (3)
- # reagent (4)
- # ring (2)
- # untangled (38)
I think I understand the bug in the diff just above. transact! on a component with an ident will queue up any other components with the same ident. If those components' paths have changed, but their parents don't rerender (say because a whole chunk of state got moved), they will still have the old paths
so I think the example there is pretty much the simplest reproduction. we have User with an ident, Blog which doesn't rerender, and Author with the same ident which gets a stale path
maybe it really is a user error, though? you need to make sure parents rerender when paths change?
Complete newbie, any reason why something like (dom/div {:className "test"} "Hi!")
doesn't have any attribute? I've tried {:style "stuff"}
and others as well, and nothing
The first argument has to be a javascript object, so it's either
#js{:className "test"}
or (clj->js {:className "test"})
Oh, great! Could you point me to a recent tutorial then? Things from ~8 months ago are simply broken.
Are you using om now, or om next?
(Note that I wasn't using https://github.com/omcljs/om/wiki/Basic-Tutorial because I find it mind-blowingly difficult to follow for some reason.)
I haven't used om now in awhile, so I'm not sure where the latest tutorials are for it.
I'd probably use reagent/re-frame over om now.
That would just be my preference though.
You can send messages/transactions in componentWillUnmount
It is called when a component will be removed
yes, I am looking for solutions which don't require component lifecycle to know about subscription
One thing thatâs throwing me a little bit in trying to learn Om Next is the argument quoting. For instance, the Quick Start defines a mutate function that looks for an âincrementâ key, but itâs called like this: (fn [e] (om/transact! this '[(increment)]))
. Why is it âquoted vector containing a sequence containing incrementâ instead of, say, (fn [e] (om/transact! this ['increment]))
?
This is amazing, no sooner do I post the question than I go back to the âuntangledâ tutorial, and the next lesson on my list has a note about quoting.
spooky.
@manutter51: That's just the way it is
take a look at https://github.com/omcljs/om/blob/master/src/main/om/next/impl/parser.cljc
Cool, thanks, Iâll check it out
The untangled tutorial also pointed me to the Datomic Pull tutorial, which also explains a lot
I was just copying the link đ
also ['increment]
doesn't make sense (I think)
how are you gonna throw params in the mix?
Let's say you want to increment with a certain amount
'[(increment {:amount 5})]
makes more sense in terms of the standard clojure(script) datastructures
i want to get the uuids that om creates on mutates. are these kept track of somewhere or do I need to listen to some event?
They are stored in the reconciler at [:config :history]
taylor.sando: how do you usually associate a UUID with the mutate that created it? I could store it in the app-state along with the mutate but that seems redundant.
I've never actually used the history or undo, I just know that is where the information is.