Fork me on GitHub
#om
<
2017-08-24
>
roklenarcic12:08:47

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

roklenarcic12:08:36

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

baptiste-from-paris14:08:59

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

danielstockton14:08:16

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.

roklenarcic14:08:11

I guess I'll be using tony kay's fulcro to solve these problems for me 🙂

roklenarcic14:08:46

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

roklenarcic14:08:50

why is that so?

roklenarcic14:08:09

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

roklenarcic14:08:21

effectively voiding the reload

roklenarcic14:08:18

this is great

claudiu14:08:54

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.

roklenarcic15:08:12

the third point

roklenarcic15:08:17

calling add-root! only once

roklenarcic15:08:50

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

claudiu15:08:52

yep, it does 🙂 there's also the #fulcro channel on slack

tony.kay15:08:06

@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.

roklenarcic15:08:05

I hope it will work for me 😉

baptiste-from-paris17:08:00

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_horwitz20:08:33

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

josh_horwitz21:08:22

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

sundarj21:08:21

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

sundarj21:08:51

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

josh_horwitz22:08:37

in

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

josh_horwitz22:08:06

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