Update: fixed it now. What I missed was that the params need to be passed specifically under the :route-params key like so:
(let [{:keys [report-props report-factory]} (r.hooks/use-report this ThingList {:route-params {:thing/id id}})]
(report-factory report-props))
Leaving this up for posterity.
---
I'm trying to use r.hooks/use-report while passing in a param for filtering the query in the resolver. I just can't seem to get the param to show up in the resolver call. It seems like the same problem as discussed https://clojurians.slack.com/archives/C68M60S4F/p1710820736208429 a while ago, but the only difference is I already have a ro/controls defined in the defsc-report. Any suggestions for what I might be missing?Is there pathom3 attribute error handling middleware somewhere for fulcro3?
Yes I think so.
is there anything, in theory, preventing one from using Fulcro with https://github.com/vadimdemedes/ink? It is a React renderer but it provides its own render function. Would that require using the raw namespaces?
How would you run this in someone’s terminal? To use this you would need to compile it with clojurescript compiler, but your command line app would be in clojure?
oh, in CLJ you don’t need it.
and in CLJ you just plug in your renderer
sorry, was in a hurry
I thought maybe it was using node/js
Ink does run in node
ALl of the react interdependencies are in CLJS. I think if you replace the rendering (root and optimized), via options, then it should work.
I’ve made videos about this…see YouTube
and this one https://www.youtube.com/watch?v=B9xB5j6kZvI&list=PLRuVLgdcJ3ngIh164bKsQH8js2pDU78fS&index=5
the latter is an internal video that isn’t searchable, but you’re free to watch it, The repo it references IS available to play with, so look at it
https://github.com/awkay/beginner-drafting/blob/main/src/main/app/application.cljc Runs in CLJ and renders out hiccup, as an example
Thanks for all the resources! I'll take a look
well, if you put react in as a module so the stuff compiles, it might work just by plugging in a custom render.
👋 I am attending Heart of Clojure this week. You can recognise me by my Fulcro t-shirt :-)
👋 See you there!