Skip to content

Instantly share code, notes, and snippets.

@stakes
Created October 26, 2018 22:02
Show Gist options
  • Save stakes/dc63a27fc657f0c6b9f4d0c49b450ad6 to your computer and use it in GitHub Desktop.
Save stakes/dc63a27fc657f0c6b9f4d0c49b450ad6 to your computer and use it in GitHub Desktop.
import { Data, animate, Override, Animatable } from "framer";
const data = Data({ scale: Animatable(1) });
const pulse = async () => {
await animate(data.scale, 2).finished;
await animate(data.scale, 1).finished;
pulse();
};
export const AnimatedElement: Override = props => {
pulse();
return {
scale: data.scale
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment