You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Argument of type 'RefObject<null>' is not assignable to parameter of type 'RefObject<HTMLElement>'.
Type 'null' is not assignable to type 'HTMLElement'.ts(2345)
useIntersection signature should accept RefObject<HTMLElement | null>.
What is the expected behavior?
To not throw a warning. It actually keeps working.
A little about versions:
OS: macOS 15.1.1
Browser (vendor and version): Chrome 131
React: 19
react-use: 17.5.1
Did this worked in the previous package version? No
The text was updated successfully, but these errors were encountered:
What is the current behavior?
Migrating to Nextjs 15.1 and React 19, the
useIntersection
started to throw a ts warning.The code in the docs does not work anymore.
The error is:
useIntersection
signature should acceptRefObject<HTMLElement | null>
.What is the expected behavior?
To not throw a warning. It actually keeps working.
A little about versions:
react-use
: 17.5.1The text was updated successfully, but these errors were encountered: