I’m sure I’m not the only one that immediately realized how similar this was to the way reagent components are written . I personally am perfectly happy to try and get rid of reagent and use (as close to) raw React as possible, and these new features like async rendering, Suspense and (now) Hooks are painting a very bright future for that road.
I decided to whip up a quick demo of it being used in CLJS today:
Very nice demo, I like how simply your use-atom brings Clj(s) atom’s and power to React with just a few lines of code. Very nice way of having global state that’s viewed as local state.
At the moment shadow-cljs is the easiest way to work with npm based dependencies directly. Yes my example is built using shadow-cljs. Because it uses some npm libraries not available in cljsjs