Skip to content

Commit

Permalink
Missing parens in useTransform example (#1571)
Browse files Browse the repository at this point in the history
The arrow function is malformed here. Even though there is technically only one argument, the array destructuring requires parentheses.
  • Loading branch information
fturmel committed Jun 7, 2022
1 parent 9f22f77 commit 3b3db38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/framer-motion/src/value/use-transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function useTransform<I, O>(
* export const MyComponent = () => {
* const x = useMotionValue(0)
* const y = useMotionValue(0)
* const z = useTransform([x, y], [latestX, latestY] => latestX * latestY)
* const z = useTransform([x, y], ([latestX, latestY]) => latestX * latestY)
*
* return <motion.div style={{ x, y, z }} />
* }
Expand Down

0 comments on commit 3b3db38

Please sign in to comment.