You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the use-swr file, I found some effect dependencies not exhaustive, I want to konw it is correct or not.
If add eslint-plugin-react-hooks, and add "react-hooks/exhaustive-deps": "warn" in your .eslintrc It will warn that React Hook useEffect has missing dependencies: 'config. suspense'
the same as below code
const revalidate = useCallback(() => {
// ...
if (fnArgs !== null) {
CONCURRENT_PROMISES[key] = fn(...fnArgs)
} else {
CONCURRENT_PROMISES[key] = fn(key)
}
// ...
}, [key]) // the fn args also not add the dependencies
anybody could make sense for me is that conrrect or not. thanks a lot
The text was updated successfully, but these errors were encountered:
In the use-swr file, I found some effect dependencies not exhaustive, I want to konw it is correct or not.
If add eslint-plugin-react-hooks, and add
"react-hooks/exhaustive-deps": "warn"
in your.eslintrc
It will warn thatReact Hook useEffect has missing dependencies: 'config. suspense'
the same as below code
anybody could make sense for me is that conrrect or not. thanks a lot
The text was updated successfully, but these errors were encountered: