You can disable it with a comment // eslint-disable-next-line react-hooks/exhaustive-deps. Because fetchData need to be called only on mount component cycle.
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I have a error in useEffect. How to fixed?
You can disable it with a comment
// eslint-disable-next-line react-hooks/exhaustive-deps
. Because fetchData need to be called only on mount component cycle.