-
Notifications
You must be signed in to change notification settings - Fork 905
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
the animated-grid-pattern component can't see any animation effect now. and it will cause the page crash after seconds. see #838
you can catch error in console:
installHook.js:1 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.
which comes from the components tsx:
// Update squares to animate in
useEffect(() => {
if (dimensions.width && dimensions.height) {
setSquares(generateSquares(numSquares))
}
}, [dimensions, numSquares, generateSquares])Affected component/components
Animated Grid Pattern
How to reproduce
Introduce it to your code
see the error in console
Codesandbox/StackBlitz link
No response
Logs
installHook.js:1 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.
which comes from the components tsx:
// Update squares to animate in
useEffect(() => {
if (dimensions.width && dimensions.height) {
setSquares(generateSquares(numSquares))
}
}, [dimensions, numSquares, generateSquares])System Info
Linux Fedora 42
ChromeBefore submitting
- I've made research efforts and searched the documentation
- I've searched for existing issues
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working