om

Please ask the channel first, not @dnolen directly!
roklenarcic 2017-08-24T12:16:47.000207Z

hm seems fulcro uses mutations to perform remote loads instead of read with remote keys

roklenarcic 2017-08-24T12:17:36.000243Z

I'm also having trouble incorporating my remote reads into actual om.next read function, much easier to use mutations

baptiste-from-paris 2017-08-24T14:02:59.000498Z

hello om friends, I struggle to understand the subquery function in a real use case. Can someone help me plz ? see here https://github.com/omcljs/om/wiki/Documentation-(om.next)#subquery

2017-08-24T14:10:16.000235Z

There is an example use-case here: https://anmonteiro.com/2016/02/routing-in-om-next-a-catalog-of-approaches/ I have to admit, i've never used it myself.

roklenarcic 2017-08-24T14:23:11.000661Z

I guess I'll be using tony kay's fulcro to solve these problems for me πŸ™‚

roklenarcic 2017-08-24T14:36:46.000643Z

hey @tony.kay your fulcro getting started tutorial has this to say about hot code reloading: Make sure the definition of the UI components is marked with :once metadata

roklenarcic 2017-08-24T14:36:50.000126Z

why is that so?

roklenarcic 2017-08-24T14:37:09.000640Z

wouldn't that make it so any changes to component code and queries doesn't get reloaded?

roklenarcic 2017-08-24T14:37:21.000474Z

effectively voiding the reload

baptiste-from-paris 2017-08-24T14:42:56.000099Z

@danielstockton thanks πŸ™‚

roklenarcic 2017-08-24T14:59:18.000004Z

this is great

claudiu 2017-08-24T14:59:54.000491Z

with hot reload if you look at the template there's also react-key that fulcro generates in development so that you get full reloads.

roklenarcic 2017-08-24T15:00:12.000441Z

the third point

roklenarcic 2017-08-24T15:00:17.000487Z

calling add-root! only once

roklenarcic 2017-08-24T15:00:50.000053Z

I hope fulcro's client.core/mount respects that

claudiu 2017-08-24T15:01:52.000782Z

yep, it does πŸ™‚ there's also the #fulcro channel on slack

tony.kay 2017-08-24T15:11:06.000403Z

@roklenarcic minor correction: fulcro standardizes the way to trigger loads via a mutation (which is what you end up doing in Om, since you have to make a mutation to mark state for your parser to have something to work on in order to generate a query to a remote)…it still uses the UI queries for the actual communication to the server, it’s just more direct about what you have to write to do so.

roklenarcic 2017-08-24T15:13:05.000300Z

I hope it will work for me πŸ˜‰

baptiste-from-paris 2017-08-24T17:00:00.000039Z

hello friends of om I have an issue with server side rendering in om. Everytime I render a page where there is inputs, I got this error

React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
 (client) ea class="textarea" placeholder="Votre t
 (server) ea class="textarea" value="yooo" placeho
which means that server renders markup which is different than the front one. And it only happens when there is a :value option on the input like that :
(dom/textarea #js {:className   "textarea"
                                     :value       "yooo"
                                     :onChange    (transact-form-field! this :message)
                                     :placeholder "Votre texte, vos questions..."
                                     :rows        "10"})

josh_horwitz 2017-08-24T20:12:33.000490Z

What currently is the best resource/tutorial for learning Om Next?

sundarj 2017-08-24T20:44:13.000547Z

https://fulcrologic.github.io/fulcro/docs.html are solid

josh_horwitz 2017-08-24T21:10:22.000321Z

They are pretty great, but I wasn't sure if I was learning Fulcro or Om

sundarj 2017-08-24T21:16:21.000327Z

Fulcro is mostly just Om with helpers and plumbing done for you; it makes it more user friendly - it's still Om through and through

sundarj 2017-08-24T21:17:51.000040Z

the official Om Next tutorials are good too, but not as friendly/thorough as the Fulcro docs

josh_horwitz 2017-08-24T22:23:37.000318Z

in

(let [{:keys (person/name person/age) (om/props this)}])
What is :keys doing?

josh_horwitz 2017-08-24T22:24:06.000191Z

I get that is is getting person/name and person/age off of props, but not sure how or why

anmonteiro 2017-08-24T23:24:44.000222Z

@josh_horwitz https://clojure.org/guides/destructuring