Fork me on GitHub
#fulcro
<
2022-07-13
>
levitanong07:07:33

hi all! I'm porting a pretty large app over from fulcro2 to fulcro3, and I'm trying to port the routing over to dynamic routers. Thing is, we use SSR for the app, and the docs (https://book.fulcrologic.com/#_initial_route) say this function exists dr/ssr-initial-state to fulfill the function of change-route! in building the state. However, such a function does not exist in the repo at the moment. There's ssr/get-ssr-initial-state but this seems like it has nothing to do with dynamic routing. I suppose at the very least the docs need to be updated, but more importantly, what can I use to make SSR work with dynamic routing?

Jakub Holý (HolyJak)12:07:12

Would https://gist.github.com/holyjak/6ead10c0b447e098026f3e24e4f1e519 help? Pls send a PR to improve the fulcro docs when you figure this out!

levitanong09:07:38

Sorry for the extremely late reply! Thank you for your response, but because this is non-trivial, I've opted to instead remove the SSR functionality from the app i'm working on. >_<

Quentin Le Guennec09:07:59

Hello. In fulcro rad, what’s the difference between using defresolver and an attr with a ao/pc-resolve value?

roklenarcic11:07:21

ao/pc-resolve is used by a middleware to generate resolvers and defresolver defines a resolver

Jakub Holý (HolyJak)12:07:19

Not really any significant difference. Personally I find it cleaner with a separate defresolver but ymmv

Quentin Le Guennec14:07:21

Just to confirm my thoughts, are resolvers defined this way the fulcro rad solution to derived data from actual storage? (eg the closest solution from re-frame subscriptions)

Jakub Holý (HolyJak)15:07:26

No. Subscriptions are client side, resolvers are server side. But also yes, Pathom is intended to shape the data into the form the frontend needs.