Skip to content

Commit

Permalink
Getting rid of import from useSpring
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgperry committed Dec 2, 2022
1 parent b64c0ab commit 1e30be8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/framer-motion-3d/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@
"@react-three/test-renderer": "^9.0.0",
"@rollup/plugin-commonjs": "^22.0.1"
},
"gitHead": "96dee88b1914347acf154ba5d6772609411de00c"
"gitHead": "b64c0ab7145e67db19d9873dd0f43aa7771cf15d"
}
3 changes: 2 additions & 1 deletion packages/framer-motion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,6 @@
"path": "./dist/size-webpack-dom-max.js",
"maxSize": "30kB"
}
]
],
"gitHead": "b64c0ab7145e67db19d9873dd0f43aa7771cf15d"
}
6 changes: 5 additions & 1 deletion packages/framer-motion/src/value/use-spring.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { useRef, useMemo, useContext } from "react"
import { animate, PlaybackControls, SpringOptions } from "popmotion"
import { MotionValue } from "../value"
import { isMotionValue } from "./utils/is-motion-value"
import { useMotionValue } from "./use-motion-value"
import { useOnChange } from "./use-on-change"
import { MotionConfigContext } from "../context/MotionConfigContext"
import {
PlaybackControls,
SpringOptions,
} from "../animation/legacy-popmotion/types"
import { animate } from "../animation/legacy-popmotion"

/**
* Creates a `MotionValue` that, when `set`, will use a spring animation to animate to its new state.
Expand Down

0 comments on commit 1e30be8

Please sign in to comment.