Fork me on GitHub
#fulcro
<
2021-01-08
>
AJ Snow01:01:03

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.

AJ Snow02:01:59

also I figured out how to run the shadow repl through intellij so that's pretty cool

Gleb Posobin05:01:22

What's the use for co-located CSS? Tried to google for that and didn't find much.

AJ Snow05:01:16

if you mean tying it in the component I think that's generally recommended for libraries, but otherwise optional

Jakub Holý (HolyJak)12:01:58

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)

Jakub Holý (HolyJak)18:01:04

Tip: If you use https://blog.jakubholy.net/2020/troubleshooting-fulcro/ remember to refresh the page regularly, I update it +- frequently.

Jakub Holý (HolyJak)18:01:51

@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!

tony.kay18:01:41

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.

❤️ 3
tony.kay18:01:03

(or you want to put resolvers in CLJ file instead of CLJC)

tony.kay18:01:50

that last reason is probably most salient right now @holyjak, since resolvers in attrs always lead to a bunch of conditional CLJ

👍 3