diff --git a/dev/react/src/examples/Animation-variants.tsx b/dev/react/src/examples/Animation-variants.tsx index f2325e6d8a..46706601e7 100644 --- a/dev/react/src/examples/Animation-variants.tsx +++ b/dev/react/src/examples/Animation-variants.tsx @@ -1,7 +1,7 @@ import { Fragment, useState } from "react" -import { motion, createMotionComponent, useMotionValue } from "framer-motion" +import { motion, useMotionValue } from "framer-motion" -const MotionFragment = createMotionComponent(Fragment) +const MotionFragment = motion.create(Fragment) export function App() { const backgroundColor = useMotionValue("#f00") diff --git a/dev/react/src/examples/motion-custom-tag.tsx b/dev/react/src/examples/motion-custom-tag.tsx index 9165b98888..aa020cf78b 100644 --- a/dev/react/src/examples/motion-custom-tag.tsx +++ b/dev/react/src/examples/motion-custom-tag.tsx @@ -1,11 +1,11 @@ -import { createMotionComponent } from "framer-motion" +import { motion } from "framer-motion" /** * An example of creating a `motion` version of a custom element. This will render into the HTML */ export const App = () => { - const CustomComponent = createMotionComponent("global") + const CustomComponent = motion.create("global") return ( { expect(container.firstChild).toBeTruthy() }) - it("renders motion div component (using createMotionComponent) without type errors ", () => { + it("renders motion div component (using motion.create) without type errors ", () => { // onTap is a motion component specific prop - const MotionDiv = createMotionComponent("div") + const MotionDiv = motion.create("div") render( {