3 ms·
You can pretty much do anything with a combination of refs, events and useEffect. It’s often fiddly and cumbersome though. Aside: That’s why I‘ve been gravita
by dgb23 3y ago
You can pretty much do anything with a combination of refs, events and useEffect. It’s often fiddly and cumbersome though.
Aside:
That’s why I‘ve been gravitating towards approaches that have much simpler execution models.
You can still do declarative and functional. But you have more control when needed, create _much_ smaller bundles, have fewer dependencies, better default performance, allocate less garbage and you can reason about your code in more fundamental ways.
In cljs this would mean to not use a react wrapper.
However I personally try to avoid using any deps for frontend, and that includes cljs. Any dep needs a justification IMO.
That justification is often not good enough, since I’m mostly writing „interactive documents with some fancy parts“.
If you’re writing something like nextjournal, roam, data rabbit or similar then it’s a different story.