the method setState:
scrollBy = (index, animated = true) => {
if (this.internals.isScrolling || this.state.total < 2) return
const state = this.state
const diff = (this.props.loop ? 1 : 0) + index + this.state.index
let x = 0
let y = 0
if (state.dir === 'x') x = diff state.width
if (state.dir === 'y') y = diff state.height
case Exception:
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.
andriod
Version
Which versions are you using:
the method setState: scrollBy = (index, animated = true) => { if (this.internals.isScrolling || this.state.total < 2) return const state = this.state const diff = (this.props.loop ? 1 : 0) + index + this.state.index let x = 0 let y = 0 if (state.dir === 'x') x = diff state.width if (state.dir === 'y') y = diff state.height
}
case Exception: 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.