is there a bug in repeat attribute of framer/motion?

Viewed 577

I have tried a couple of times running the code below, both locally and on codesandbox. The repeat animation of h1 just doesn't work, is there anything wrong with my code or is it a bug of repeat attribute for motion?

import React from "react";

import { motion } from "framer-motion";
import "./styles.css";

export default function App() {

  return (
    <motion.div>
      <motion.h1
        initial={{ y: -200 }}
        animate={{ y: -10 }}
        transition={{ repeat: Infinity, duration: 2 }}
      >
        Test
      </motion.h1>
    </motion.div>
  );
}

Check the code on Codesandbox

1 Answers
Related