Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Parameter error for useInView root example #2840

Open
Debbl opened this issue Oct 23, 2024 · 0 comments
Open

[DOCS] Parameter error for useInView root example #2840

Debbl opened this issue Oct 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Debbl
Copy link

Debbl commented Oct 23, 2024

Describe the bug

Parameter error for useInView root example

https://www.framer.com/motion/use-in-view/###root

the root should be at second parameter

function Carousel() {
  const container = useRef(null)
  const ref = useRef(null)
-  const isInView = useInView({ root: container })
+  const isInView = useInView(ref, { root: container })

  return (
    <div ref={container} style={{ overflow: "scroll" }}>
      <div ref={ref} />
    </div>
  )
}
image

The margin is also.

https://www.framer.com/motion/use-in-view/###margin

image
@Debbl Debbl added the bug Something isn't working label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant