Hello, Some article or repository where I can learn how to setup storybook with a re-frame app?
pretty much the same as this one I'd guess https://github.com/thheller/shadow-cljs-storybook-reagent
Just trying it right now, but getting:
[:storybook] Compiling ...
[:storybook] Build failure:
The required namespace "react" is not available, it was required by "reagent/core.cljs".it works now, let me explore it
Is it possible to destructure js objects?
In squint: destructuring JS objects: yes
squint also supports js-await, which properly translates to js await
another option is promesa: https://github.com/funcool/promesa
(p/let [result somepromise] ...)
I went with js-interop lookup for destructuring and .then for promises, I'd use js-await but maybe next time
Not by themselves. But it's possible with e.g. cljs-bean. And you can also destructure JS arrays.
Also what would be an easy way to await a promise? deref doesn't seem to work.
Or just use .then - that's what I do.
I'll just do old fashioned .then
Editted
ShadowCLJS has a js-await construct
ah yeah as mentioned in the link