Ok something is kind of working now…
Having the situation, where I have two deferred routings with the same ident
RootRouter
routes to Process
.
and the
ProcessRouter
(inside Process
) routes to ProcessHome
.
Process
offers UI for every sub page of the router. [:process/slug :process/title]
ProcessHome
has details for the Process. [:process/slug :process/title :process/description]
what purpose does :ui/fetch-state
serve in the pagination example in the book? I see that ui bits are typically used to mess with front end stuff, but I don't see the use case for it in the example.
ah, that is a bit of a problem 🙂
also I figured out how to run the shadow repl through intellij so that's pretty cool
What's the use for co-located CSS? Tried to google for that and didn't find much.
it is popular in the React world - https://reactjs.net/features/css-in-js.html The idea is to avoid style conflicts so you can safely style your component and be sure now other one will mess up with it (b/c the styles will end up including the name of the component or st. similar)
this gives the motivation I think https://speakerdeck.com/vjeux/react-css-in-js?slide=2
@holyjak Nice, thank you!
if you mean tying it in the component I think that's generally recommended for libraries, but otherwise optional
Tip: If you use https://blog.jakubholy.net/2020/troubleshooting-fulcro/ remember to refresh the page regularly, I update it +- frequently.
@tony.kay here https://youtu.be/P2up8qcDmJs?t=1644 you define the all-widgets
as a defattr
, saying that it could also be just a resolver but that by using defattr
you sometimes get some other things out of it.
So when would you recommend using defattr
vs defresolver
if I only need the resolver, i.e. if I don't need to use it as an attribute on a form/report? Thank you!
defattr is for most cases. I use defresolver for top-level keys, like the entry point of a report, since you never need to augment that with anything. You can also make a defattr and a resolver, which might be good if you are for example using pathom 3 with current RAD, or pathom 2 with some future pathom3-based RAD.
(or you want to put resolvers in CLJ file instead of CLJC)
that last reason is probably most salient right now @holyjak, since resolvers in attrs always lead to a bunch of conditional CLJ