Live data from Hacker News

Show HN: React-magic-motion, a package to automatically animate your components

react-magic-motion.com

11–16 of 16 posts

Re: Show HN: React-magic-motion, a package to automatically animate your components

#11
post #8

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).

This requires reagent?

Re: Show HN: React-magic-motion, a package to automatically animate your components

#12
post #8

Earlier 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?

I guess you could use a React component somehow without Reagent, but if you're using ClojureScript you're most likely already using Reagent I guess?

Re: Show HN: React-magic-motion, a package to automatically animate your components

#13
post #3

How does it compare to the infamous framer motion?

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?

Re: Show HN: React-magic-motion, a package to automatically animate your components

#14

How would one adapt this to vanilla js (or clojurescript)?

Not sure if it makes sense to adapt a library which relies that much on react to a non-react project.

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

#15
post #3

Earlier 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?

It provides an opinioned-default transition for child components. You don't work directly with framer - you use the HOC it provides and your elements animate automatically based in (what I assume) are sensible defaults.

Re: Show HN: React-magic-motion, a package to automatically animate your components

#16
post #12

Earlier quoted context omitted.

This requires reagent?

I guess you could use a React component somehow without Reagent, but if you're using ClojureScript you're most likely already using Reagent I guess?

I'm using Electric clojure, so no.
Post reply on HN