om

Please ask the channel first, not @dnolen directly!
matthavener 2017-05-11T01:07:25.767005Z

cp: in your parser mutation function, you can return a modified ast

matthavener 2017-05-11T01:07:56.771113Z

@dehli: so return something like this: {:remote (assoc (:ast env) :params (deref (:state env))}

matthavener 2017-05-11T01:08:22.774386Z

that would attach the entire app state to the remote mutation.. but you could cut that down

dehli 2017-05-11T01:08:31.775474Z

i'll give that a try, thanks a lot!

matthavener 2017-05-11T01:08:35.775971Z

sure

pedroteixeira 2017-05-11T12:49:09.832254Z

I'm struggling with defmacro to wrap defui in om.next. it's more of a cljs doubt, but perhaps some has already seems this here: java.lang.Object does not declare method called render. Was thinking something along:

(defmacro defcomponent [vname cfg & body]
  `(do
     (om/defui ^:once ~(symbol vname)
       Object
       ~@body))) 
anyone using such wrappers?

2017-05-11T13:10:53.221020Z

macro over a macro, if you are feeding (render [this]..) into the body then maybe try om/ui that's almost the same, just render.

pedroteixeira 2017-05-11T14:30:09.012378Z

ok thanks.

2017-05-11T15:12:23.097963Z

I have a problem with getting the data from the server normalized when I’m using compassus. If I just mount the app with om/add-root! and point to my root component the server response gets normalized but when I mount it via compassus/mount! the server response isn’t. I have figured out that the problem is that the root query isn’t correct when using compassus thus is doesn’t get normalized, but how am I suppose to do it? Here is my core.cljs as a reference: https://gist.github.com/snichme/101600b849dc7bcab17877a3310d4ad2

anmonteiro 2017-05-11T15:15:35.178712Z

@snichme you're not showing your send function, but I suspect you're not passing the query as an argument in the send callback

anmonteiro 2017-05-11T15:18:26.250451Z

Opened this which will allow you not to pass a query https://github.com/compassus/compassus/issues/29

2017-05-11T15:24:19.399298Z

Sorry, my send function is the same as the one you use in your fullstack example: https://github.com/anmonteiro/om-next-fullstack/blob/master/src/shared/todomvc/util.cljc#L18

anmonteiro 2017-05-11T15:27:24.477469Z

@snichme right, so try passing the query (`remote`) as the 2nd arg to cb

2017-05-11T15:27:59.492653Z

ok, will try that, thanks

2017-05-11T16:59:55.669812Z

that worked!

anmonteiro 2017-05-11T17:17:11.047435Z

awesome

2017-05-11T18:39:48.899078Z

So with compassus, how do you do to route to a specific item with id, for example /posts/123 I want to render the post with id 123 but I cannot setup ident routes for all because they are dynamic. Are there any examples of how to do this?

matthavener 2017-05-11T21:46:09.612558Z

@snichme https://github.com/cmcfarlen/compassus-route-params check this out

1👍
currentoor 2017-05-11T23:20:01.772154Z

Are there plans to get Om Next out of alpha? It’s a wonderful framework that I use in production everyday. Just seems strange that it’s still in alpha.

7👍