@tony.kay that's really cool π Nice!
Is there a render that happens before the InitialAppState is merged in?
i'm seeing some exceptions that make me think that where I need to ensure there's default values for props
IAS has to be given to reconciler, so no
ok thanks, the render with nil in props are happening through some other way then, that helps narrow it down thanks
@jasonjckn I feel like I've encountered something similar (initial render had nil
props, everywhere)
I think in my case it was due to misshapen data being returned from my initial server api-read
.
thanks for the input, i'm following a thread right now on it my Root query has {:foo (get-query FooComponent)} which means :foo is read from global state , but also I have an ident [:foo X]
so i think there's conflict
(FooComponent has ident [:foo X])
Started looking at Compassus a bit. Is there a way to use Compassus and Untangled together? Looks like they both want to wrap the application
@grzm not easily
that's what I suspected π
btw, the other day you were right about the loading data bit after I added a leaf component. The shape of the incoming data needed to change.
I dunno if this is useful @grzm, since looks like Compassus is pretty full-featured, but for us it was sufficient to just use Pushy with a bit of custom wrapping which basically boiled down to make it so on each route change event we call om/transact!
to update :ui/current-route in the app state.
@therabidbanana Yeah, I was thinking the same when I was looking over the Compassus README. @anmonteiro your README is really good π
One thing we found useful with that approach is "post-transactions" that the routing event tacks on for certain pages to get data to load, etc.
@grzm I donβt know when you looked at Compassus
Yesterday
so you already saw the mixin stuff
Yup. I have an allergy to mixins, so I'll admit I haven't looked at them too closely
Iβm planning on moving e.g. the :history
config key to be a mixin too
since itβs just something that hooks into the root component lifecycle
so some changes coming to the next release
just a heads up
but migration will be very straightforward
Cool. At this point I'm just looking at it for ideas that I can integrate into my existing Untangled app. And there are a lot of good ideas in there.
e.g. this was the only thing that we needed to migrate from :wrapper
to a mixin:
https://github.com/compassus/compassus/commit/b63876a806bb03b3e462754136bfcd24fdf2001b#diff-a6beef26a2a83ef9397df32b89e26117L114
Do you generally write most of your code cljc at this point?
Ever since Cellophane existed, yea π
I think the number of cljc namespaces I've created at this point is still less than 5 π
Good habit to get into, though, if writing web apps with a server component. Also helps reinforce the distinctions between the two implementations.