score:1
Accepted answer
in your square component, you should not call directly the props.onclick:
function square(props) {
return (
<button
classname="square"
onclick={props.onclick}
>
{props.value}
</button>
);
}
it calls the state at the render and create the infinite loop.
Source: stackoverflow.com
Related Query
- React warning Maximum update depth exceeded
- react - maximum update depth exceeded using react-table
- React js, Maximum update depth exceeded
- React - Invariant Violation: Maximum update depth exceeded
- React Maximum update depth exceeded error caused by useEffect only in test
- Maximum update depth Exceeded during React Easy Crop
- Maximum update depth exceeded in React Infinite Scroll
- React App Login Error : Maximum update depth exceeded
- React maximum update depth exceeded | useEffect dependencies
- React error: warning maximum update depth exceeded
- React setState inside componentDidUpdare leads to Maximum update depth exceeded
- Maximum update depth exceeded in React error
- RESOLVE : react error : Maximum update depth exceeded
- React Maximum update depth exceeded in functional component
- Error with React Stripe split card elements: Maximum update depth exceeded
- Maximum update depth exceeded - React Js
- React maximum update depth exceeded | useEffect with user from firebase
- React js Maximum update depth exceeded
- React Custom Hook produce warning: Maximum update depth exceeded
- Maximum update depth exceeded react
- React redirect causes error: Maximum update depth exceeded
- React question: Error: Maximum update depth exceeded
- React JS Hooks - Maximum update depth exceeded
- React error in console - Maximum update depth exceeded when input length is more than 5
- Maximum update depth exceeded with react context api
- React JSX: Maximum update depth exceeded
- Maximum update depth exceeded error in react app
- React Tutorial: Maximum update depth exceeded
- React Typescript with hooks : Maximum update depth exceeded error
- React : Maximum update depth exceeded
More Query from same tag
- How to redirect to another page using history on React js?
- React Color Picker on bootstrap navbar
- React state is getting overwritten when coming back from child component
- ReactJS: The last radio button value cannot be sent
- Can I modify state directly when using React with MobX?
- React Router: Handling queries through React router
- (React Hooks): one setstate is not working, but double setstate is working?
- .map() in reactJs is not returning anything
- React not taking initial input type number as 0
- How to return the data in one function call for two different object keys
- How to get the actual error from express instead of status 500 in React on failed fetch in POST method?
- Javascript: DOMException: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
- Dockerizing a React App: The app starts inside the container, but it not accessible from the exposed port
- Easy setup react redux with next.js (React)
- How to conditionally apply styles in a react component with CSS Modules?
- React fetching data twice
- blueprintjs Select Component onItemSelect Function Doesn't Run
- How to initialize a FieldArray from state using redux-form?
- React children with typescript
- React.js search filter in treeview
- React - prop function within prop function
- Testing functional components with renderIntoDocument
- How to decrement amount after form submit in node js
- I get errors to setup ReactJs Environment
- increase react application performance
- Update the header title based on the page displayed ( sibling component)
- ReactJS Invalid Checksum
- how to set dismissing alert to show just once
- Non hubspot form popup not creating contacts
- Want to give different state to each element with redux