score:1

your componentdidupdate() is the one causing infinite rendering issue

i can see that you already fetch the info in your componentdidmount(), so it's not necessary to fetch them over again.

  • first, after your component is rendered componentdidmount is invoked
  • then your ensuredatafetched is fetched.
  • your redux state is changed
  • then your componentdidupdate invoked due to that re-rendering
  • your redux state is changed again.
  • then your componentdidupdate invoke all over again.
  • infinite loop...

just remove this block will end that endlessly rendering:

public componentdidupdate() {
    this.ensuredatafetched();
}

Related Query

More Query from same tag