So, you're fetching data with #useEffect and you need to make a state update to set an error, when something along the line of the fetch went wrong. But the linter complains that you now need to include the error state variable in its dependency array. But now, when there is an error, it will run in a loop because it runs whenever the error state var is updated, which it does when there is an error.
What is the intended pattern here? #react #javascript #webdev
=> More informations about this toot | View the thread | More toots from nachtfunke@indieweb.social
=> View useeffect tag | View react tag | View javascript tag | View webdev tag This content has been proxied by September (ba2dc).Proxy Information
text/gemini