biff

2024-07-04T07:07:51.087659Z

Doing some experimenting with using Pathom for server-side rendering:

💯 1
Danny Almeida 2024-07-04T08:21:13.998549Z

that's interesting - what role does pathom play in SSR ? Curious to know

2024-07-04T16:45:14.069409Z

It's helpful for breaking your pages apart into small individual pieces without those pieces needing to do a bunch of duplicated database queries/logic. e.g. in this example, the :ui.shell/app resolver needs to query for the current user's email address, but the top-level resolver (`:ui/subscriptions`) doesn't need to know about that. And if :ui/subscriptions also needed to query for something from the user's document, pathom would make sure that the user document only gets queried for once.

🤘🏼 1
Danny Almeida 2024-07-05T03:03:54.665329Z

i find it interesting that you are outputting html snippets instead of data through resolvers. Didn't think of that at all 😄

2024-07-05T03:39:36.624129Z

haha yeah it was kind of a light bulb moment, took a while before it occurred to me

🎉 1
⚡ 1
Drew Verlee 2024-07-10T05:18:40.345399Z

Doesn't ui/subscriptions "know" about it through ui.shell/app?

2024-07-10T05:51:26.609779Z

:ui/subscriptions doesn't need to query for :user/email and then pass that to :ui.shell/app. I.e. components need to specify their direct dependencies, but they don't need to query for transitive dependencies.

👍 1