Infinite loop inside Box Component
See original GitHub issueDuplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
When is send extra non props to Box component it goes to infinite loop and the app not working until browser stop the current tab.
Expected behavior 🤔
Box component should accept extra non it’s props and working properly yet.
Steps to reproduce 🕹
Steps:
Context 🔦
No response
Your environment 🌎
System:
OS: Linux 5.11 Ubuntu 20.04.3 LTS (Focal Fossa)
Binaries:
Node: 14.18.1 - /usr/bin/node
Yarn: 1.22.17 - ~/projects/repository/frontend/node_modules/.bin/yarn
npm: 6.14.2 - /usr/bin/npm
Browsers:
Chrome: 95.0.4638.69
Firefox: 94.0
npmPackages:
@emotion/react: ^11.5.0 => 11.7.0
@emotion/styled: ^11.3.0 => 11.6.0
@mui/base: 5.0.0-alpha.58
@mui/icons-material: ^5.0.4 => 5.2.0
@mui/lab: ^5.0.0-alpha.51 => 5.0.0-alpha.58
@mui/material: ^5.2.2 => 5.2.2
@mui/private-theming: 5.2.2
@mui/styled-engine: 5.2.0
@mui/styled-engine-sc: ^5.0.3 => 5.1.0
@mui/styles: ^5.0.1 => 5.2.2
@mui/system: 5.2.2
@mui/types: 7.1.0
@mui/utils: 5.2.2
@types/react: ^17.0.27 => 17.0.37
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
styled-components: ^5.1.1 => 5.3.3
typescript: ^4.3.5 => 4.5.2
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Infinite loop inside Box Component #30074 - mui/material-ui
When is send extra non props to Box component it goes to infinite loop and the app not working until browser stop the...
Read more >Infinite loop while trying to implement debounce user search ...
I am getting the following infinite loop error: react-dom.development.js:27292 Uncaught Error: Maximum update depth exceeded. This can happen ...
Read more >Infinite Loops in Javascript - Flexiple
An infinite loop is a piece of code that keeps running forever as the terminating condition is never reached. An infinite loop can...
Read more >What to do if you accidentally run an infinite loop (Windows)
In the event we are not running a long program, there is every possibility it is locked in an infinite loop, so 'Kill...
Read more >loops in python - GeeksforGeeks
Note: It is suggested not to use this type of loops as it is a never ending infinite loop where the condition is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well the problem is that you are setting the
onChange
on two elements. In theCommonFields
you are debouncing which is great, but in theBox
you are not, so hence the problem. It is not related to theBox
component, using simplediv
there would have the same effect. See https://codesandbox.io/s/angry-nash-h2pgr?file=/src/SchemaField.tsx as a prove. I would recommend restructuring theonChange
and not propagating it to theBox
.It doesn’t look like this bug report has enough info for one of us to reproduce it.
Please provide a CodeSandbox (https://material-ui.com/r/issue-template-latest), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem.
Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve