score:2

replace this:

onclick={this.remove(i)}

by this:

onclick={() => this.remove(i)}

explanation: while rendering, react evaluates this.remove(i), which changes the state or the props, thus triggering another render, and looping to re-evaluate this.remove(i); creating a (hidden) infinite loop. () => this.remove(i) is a function so the state or the props do not change. also, it's probably what you wanted to code anyway ;)


Related Query

More Query from same tag