Closed bear-ei closed 5 months ago
I don't repro this with RNTester on either 0.72 or 0.73. Are you sure there isn't an extra setState
somewhere in your app?
https://github.com/microsoft/react-native-macos/assets/6722175/6f2e1a22-3c5d-485f-854c-36745992cfcb
I don't repro this with RNTester on either 0.72 or 0.73. Are you sure there isn't an extra
setState
somewhere in your app?Screen.Recording.2024-02-22.at.11.06.40.PM.mov
Thanks for your reply, my situation is a bit complicated, I'm building a reusable UI component and just introduced useWindowDimensions() , the component doesn't depend on it for the behavior of setState then it shows "Maximum update depth exceeded" and the error stack points to setState in useWindowDimensions, I think I need to double-check the problem.
FWIW, React Native macOS also just supports setting the tooltip
prop on any View/Text/Image.
Environment
Steps to reproduce the bug
Try to drag and drop to change the application window size after using useWindowDimensions.
Expected Behavior
No response
Actual Behavior
No response
Reproducible Demo
No response
Additional context
▶︎ 'Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn\'t have a dependency array, or one of the dependencies changes on every render.',