There is an array of this.props.bets , when trying to calculate the coefficient jumps error Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops. Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops. :
render() { let odd = 1; this.props.bets.map((bet) => { odd *= bet.odd; }); this.setState({ odds: odd }); return (...) }