Answers for "can we use setstate inside build"

0

can we use setstate inside build

Replace your setState() calls with setStateIfMounted() and define it as:

void setStateIfMounted(f) {
  if (mounted) setState(f);
}
Posted by: Guest on August-05-2021

Code answers related to "can we use setstate inside build"

Code answers related to "Javascript"

Browse Popular Code Answers by Language