hm seems fulcro uses mutations to perform remote loads instead of read with remote keys
I'm also having trouble incorporating my remote reads into actual om.next read function, much easier to use mutations
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
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.
I guess I'll be using tony kay's fulcro to solve these problems for me π
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
why is that so?
wouldn't that make it so any changes to component code and queries doesn't get reloaded?
effectively voiding the reload
@danielstockton thanks π
@roklenarcic take a look at https://anmonteiro.com/2016/01/writing-om-next-reloadable-code-a-checklist/
this is great
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.
the third point
calling add-root! only once
I hope fulcro's client.core/mount respects that
yep, it does π there's also the #fulcro
channel on slack
@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.
I hope it will work for me π
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"})
What currently is the best resource/tutorial for learning Om Next?
They are pretty great, but I wasn't sure if I was learning Fulcro or Om
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
the official Om Next tutorials are good too, but not as friendly/thorough as the Fulcro docs
in
(let [{:keys (person/name person/age) (om/props this)}])
What is :keys doing?I get that is is getting person/name and person/age off of props, but not sure how or why