How would one adapt this to vanilla js (or clojurescript)?
Unsure about vanilla JS, but for ClojureScript, import the MagicMotion component from react-magic-motion and then wrap whatever you want to automate with the MagicMotion component, seems to be enough (but I haven't tried myself).
Show HN: React-magic-motion, a package to automatically animate your components
11–16 of 16 posts
Re: Show HN: React-magic-motion, a package to automatically animate your components
#12Earlier quoted context omitted.
Unsure about vanilla JS, but for ClojureScript, import the MagicMotion component from react-magic-motion and then wrap whatever you want to automate with the MagicMotion component, seems to be enough (but I haven't tried myself).
This requires reagent?
Re: Show HN: React-magic-motion, a package to automatically animate your components
#13Re: Show HN: React-magic-motion, a package to automatically animate your components
#14How would one adapt this to vanilla js (or clojurescript)?
Depending on the project, you could achieve a similar effect with other means, from pure css to some other library like https://revealjs.com/auto-animate/
Re: Show HN: React-magic-motion, a package to automatically animate your components
#15Earlier quoted context omitted.
It's in the post: > This automatic animation built on top of framer-motion, so that means that you will get all of its features as well (spring animation, shared layout animations, etc...).
But... what makes it different?