Fork me on GitHub
#om
<
2016-04-20
>
iwankaramazow05:04:11

My two cents: I've been using React 15 since a few weeks with Om Next, didn't experience any problems

madvas07:04:59

Is there way to declare contextTypes in Om.Next? I mean without using React.createClass directly

hlolli10:04:24

I was having such a good day, developing reactive svg charts in om.next and google chrome. Then I decide to be a rebel and open Mozilla Firefox. BAM, svg elements with filter will just not show, removing filter shows the svg elements. I can't believe react developers oversee this?

fifigyuri13:04:17

I see that the read function in https://github.com/omcljs/om/wiki/Thinking-With-Links! does not work with newer om versions. I’m using 1.0.0-alpha32 and the first parameter passed to the reader hasn’t a :query key, but it has :query-root. I tried to use the function with a small change, but the reader does not return the same result as db->tree. Not sure where the problem is

anmonteiro13:04:24

@fifigyuri: definitely something on your side

anmonteiro13:04:44

the read function has :query for sure

jimmy13:04:31

is there any chance that a client only read key being sent to server as well ? Since the remote value for that read function always return nil.

anmonteiro13:04:15

@fifigyuri: you mentioned the Links tutorial

anmonteiro13:04:30

it’s quite easy to understand why you have no query key in the example you pasted

anmonteiro13:04:45

which is a different case from the tutorial

anmonteiro13:04:05

there won’t be a query because you’re simply reading a top-level prop

anmonteiro13:04:28

if it was a join, say {:some/key [:other :even-other]}

anmonteiro13:04:49

the read method for :some/key will receive [:other :even-other] as the query

fifigyuri13:04:37

ok, thanks, I understand now, I wanted to try it in isolation, I need to set the case up differently than to see how it works

jimmy14:04:36

ah, regarding link in om next, I have this simple query

`[:app/route
       :route/data
       [:current-user ~'_]
       {:modals-props ~modals-query}
       {:active-component/query ~'?active-component/query}]))
I have the current-user returned but it's in this format instead of a simple key in a map ...
{
 :app/route {}
 [:current-user _] {:db/id 17592186045463}
}

anmonteiro14:04:15

@nxqd: using db->tree?

jimmy14:04:50

@anmonteiro: I will try. Does the db->tree will change the ast along the way as well ? I can see that I have :key [:current-user _] in ast.

jimmy14:04:00

what I don't really understand here is, I do use ident in a list / item type. The results of for example :list is [[:item/by-id 1] [:item/by-id 2]] , then at this time, I can use db->tree to expand tree value into key :list. But in the case above, the key is [:current-user _], and the value is actually a map {:db/id 1}. I have tried db->tree like this (om/db->tree query (get st k) st). query is nil in this case. This doesn't make any sense for me T_T

anmonteiro14:04:52

@nxqd: Only db->tree resolves links

anmonteiro14:04:05

you can’t expect some magic to happen just because you’re using the link notation simple_smile

jimmy14:04:54

@anmonteiro: I think I got your point, actually I should use db->tree to resolve the link annotation on the query that contains the link not in the :current-user itself. let me try again 😄

iwankaramazow21:04:33

Hey everyone, I just finished an initial implementation of a (nested) router which aggregates queries for Om.Next https://github.com/IwanKaramazow/om-router Any feedback would be appreciated. I've only tested it on a few side projects with (good) results. That being said, this is an initial release, it might crash. 😄 Aside from the readme there aren't any docs/examples yet, I'll be writing some examples over the coming weeks. Most things work, i.e. nested routing, index-routes, redirects, onEnter, onLeave. If there's something that isn't doing what it should be doing, file an issue, submit a PR or you can find me here simple_smile

7h3kk1d22:04:10

How do you usually deal with failed mutations on remotes in om-next?