githuboftigran / rn-range-slider

A native slider with range
MIT License
234 stars 130 forks source link

Warning maximum update depth on useEffect function #136

Open windcloudit opened 1 year ago

windcloudit commented 1 year ago

Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.

  useEffect(() => {
    updateThumbs();
  }, [updateThumbs]);

Do you know this error, and it is not running IOS after build release

robertn702 commented 1 year ago

@windcloudit Were you ever able to resolve this issue? I'm running into the same error.

omaranwaar commented 8 months ago

@windcloudit @robertn702

  useEffect(() => {
    updateThumbs();
  }, [updateThumbs]);

remove updateThumbs from dependency array and patch the fix