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
@fellmann Thanks for the fixed code, made a custom hook and this works great now. Would be nice to have this fix merged in, definitely wasted a lot of time on this bug
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.12.2
What package has an issue?
@mantine/hooks
What framework do you use?
Vite
In which browsers you can reproduce the issue?
All
Describe the bug
The use-in-viewport hook does not react to changes of the ref. If the observed element changes, it stops working.
If possible, include a link to a codesandbox with a minimal reproduction
https://codesandbox.io/p/sandbox/mantine-react-template-forked-nlnrm7
Possible fix
After some problems especially in StrictMode / Dev, I found a simple but working solution:
Self-service
The text was updated successfully, but these errors were encountered: