reagent

A minimalistic ClojureScript interface to React.js http://reagent-project.github.io/
Spaceman 2020-06-01T08:44:33.048700Z

@jcb I don't know why but with or without AnimatePresence I have to click twice or refocus on the page to make the animation happen. Do you have working code that actually works handy?

Spaceman 2020-06-01T08:45:26.049Z

@ouvasam please reply with the code you mentioned (promised?)

Spaceman 2020-06-01T08:47:23.050300Z

@jcb overall I'm using the #lumius framework with the reagent configuration, so the rendering happens however it handles it by default. I think lein new luminus app-name

jcb 2020-06-01T12:29:38.051Z

Apologies for the delay; don’t get to use clojure much atm. So something like this worked with reagent 8.1 and framer-motion 1.4.2. Also using shadow-cljs. simplified example - [:> AnimatePresence ^{:key :some-unique-data}[:> framer-motion/motion.div {:initial {:opacity 0} :animate {:opacity 1 :transition {:duration 0.8}} :exit {:opacity 1 :transition {:duration 0.8}} } [:h1 "some content"]]]

jcb 2020-06-01T12:32:25.052700Z

haven't been able to look at the newer reagent or framer-motion APIs, so not sure if you'll still need to jump through a few hoops to use the motion hooks.