Horje
error-too-many-re-renders-react-limits-the-number-of-renders-to-prevent Code Example
error-too-many-re-renders-react-limits-the-number-of-renders-to-prevent
The problem can be found in your onClick prop:

<button className="previous-round" onClick={setOrderData_(previous(orderData_))}>&#8249;</button>
                                            ^
Everything between the curly braces gets evaluated immediately. This causes the setOrderData_ function to be called in every render loop.

By wrapping the function with an arrow function, the evaluated code will result in a function that can be called whenever the user clicks on the button.^




Javascript

Related
Delete - Cloudinary Code Example Delete - Cloudinary Code Example
javascript call function from event handler es6 Code Example javascript call function from event handler es6 Code Example
react set multible attribute values Code Example react set multible attribute values Code Example
run javascript in iframe Code Example run javascript in iframe Code Example
jquery remove duplicates from array Code Example jquery remove duplicates from array Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10