This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-18
Channels
- # alda (6)
- # architecture (1)
- # bangalore-clj (3)
- # beginners (39)
- # boot (292)
- # braveandtrue (1)
- # cider (7)
- # clara (2)
- # cljs-dev (20)
- # cljsjs (9)
- # cljsrn (42)
- # clojure (127)
- # clojure-chennai (1)
- # clojure-dev (96)
- # clojure-india (1)
- # clojure-russia (175)
- # clojure-spec (56)
- # clojure-uk (11)
- # clojureindia (1)
- # clojurescript (82)
- # core-async (7)
- # cursive (21)
- # data-science (1)
- # datomic (173)
- # funcool (4)
- # hoplon (8)
- # instaparse (1)
- # jobs (7)
- # jobs-discuss (1)
- # jobs-rus (30)
- # lambdaisland (1)
- # lein-figwheel (8)
- # off-topic (5)
- # om (51)
- # onyx (79)
- # other-languages (7)
- # planck (8)
- # re-frame (95)
- # reagent (6)
- # rum (8)
- # specter (4)
- # untangled (54)
- # yada (5)
why is it that after mutations the parser gets om.next/full-query?
@ag: easier to pass :logger nil
to the reconciler
For production builds set closure-defines goog.DEBUG false
@solussd: I still don’t understand the problem you’re having, it seems that everything should work
happy to look at a minimal case
mutations get passed the full query because of incremental rendering
if a component down the tree performs a transaction, Om Next doesn’t re-render from root. Instead, it only re-renders the subtree rooted at the component that called transact!
this is why full-query
is needed
so that the component that transact!
s gets the query focused at its subtree
@anmonteiro: Ok, that makes sense and explains some behavior I’m seeing.
At least some of my issues were caused by transacting against the reconciler directly instead of the root component for route updates.
@solussd: transacting against the reconciler is just fine but it also provides a finer-grained level of control
which means you need to deal with the consequences of that
what is an example of a consequence?
one of those being that you need to queue your root desired query for re-read because Om won’t queue any components by default when transacting against the reconciler
(since no components have performed the transaction)
I’m familiar with providing keys to reread in a transact! call, is queuing a query different?
@solussd same thing, just provide a query instead of a key
which leads us to another limitation of transacting against the reconciler
Om won’t transform-reads
by default when you transact!
against the reconciler
meaning that the keys you provide to re-read don’t get expanded into the query they reference
so you must provide the exact query you want to be re-read
here’s an example: https://github.com/compassus/compassus/blob/master/src/main/compassus/core.cljc#L100
interesting, thanks
it appears I’m trying to implement the functionality of compassus– … maybe I should be using it.
@solussd: happy to have more people using it
if you end up using it, make sure to report any stuff that makes you uncomfortable along the way
Hey guys, aside the official document https://github.com/omcljs/om/wiki/Applying-Property-Based-Testing-to-User-Interfaces what else would you recommend for e2e testing of om.next app?
@ag there’s this: https://www.youtube.com/watch?v=M1Tl-YLqkQc&list=PLZdCLR02grLq4e8-1P2JNHBKUOLFTX3kb&index=15
is there a way to convert an external library’s react component into an om component?
dynamically, that is. i.e. (om/react-to-om reactComponent query ident etc...)
@ethangracer not currently, that I know of
however, it shouldn’t be hard to put something together
sounds like a cool mini-project
wanna point me towards an example React class that you’d like to see adapted?
I’m thinking about integrating Recharts: http://recharts.org/
@ethangracer I don’t understand why you’d want to have a query in an otherwise 3rd party lib
not saying it shouldn’t be possible
If I want to store props to pass to that component in app state
then having a query would be handy
gotcha
otherwise I’d have to wrap it in another component just for the query
which is important especially for charts
the tricky part is probably passing props
I can have a go at that tomorrow
not promising anything, but should be a fun couple of hours
yeah no problem, I’d be curious to hear how it goes either way