带有 react js 的 framer-motion 钩子调用无效。钩子只能在函数体内部调用

时间:2021-05-14 21:35:01

标签: reactjs react-hooks framer-motion

嘿,我确实安装了 framer-motion 并像这样导入

import { motion } from "framer-motion"



 function App(){
  return(
   <motion.div>
   Test
   </motion.div>
    )
   }
  export default App;

我收到这个错误提示无效的钩子调用。 Hooks 只能在函数体内调用?

我也试过

0 个答案:

没有答案