Open mohammad-reza-rahbar opened 21 hours ago
Most likely caused by some state change that happens upon tree controller initialization, in combination with the data
array that is re-created from scratch on every render. Little you can do about it except for moving your data outside the component to have a stable reference.
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.13.0
What package has an issue?
@mantine/core
What framework do you use?
Vite
In which browsers you can reproduce the issue?
All
Describe the bug
I spend hours to figure out defining Tree's data inside a React component when using
useTree
hook causes an infinite re-render!If possible, include a link to a codesandbox with a minimal reproduction
No response
Possible fix
No response
Self-service