so it turns out I focused so much on cljs, I forgot react. Obviously, if I want to do an effect, like talking to a remote api, I should wrap the code in a use-effect, not just write it in a component.
otoh, I tried to write my components in a file and use them from another file and it seems that defnc is not enough for it to be usable?
components.cljs has (defnc CompA ...) and I tried to refer to it from app.cljs
To be sure I created a var in components.cljs with (def) and that I could see fine.
ok, so I think the new file had so many errors that it broke after the var declaration, that's why the :refer didn't work
heh, I just realized that at least one component I created with defn
not with defnc
and it still worked fine.
defnc
doesn’t really do a whole lot
it basically does when defn
does but wraps the props argument into something you can destructure easily
yeah, and this particular component haven't had any props 🙂