ucdavis / Peaks

https://getpeaks.ucdavis.edu/
MIT License
7 stars 2 forks source link

fix useEffect() infinite loop #1350

Closed laholstege closed 9 months ago

laholstege commented 9 months ago

eslint wants the functions we're using in our useEffect() to be part of the dependency array, but our functions are () => {} so it changes every time and loops. stupid to use the entire props in the dep array regardless, that's my bad. i believe this is a case where we'd want to use useCallback() but i'll get that working in a different PR