mirror of
https://github.com/dergigi/boris.git
synced 2025-12-17 14:44:26 +01:00
fix: remove isMounted from useEffect dependencies
- isMounted is a stable function from useMountedState and shouldn't be in deps - Including it was preventing effects from running correctly - Fixes issue where articles wouldn't load (stuck on spinner)
This commit is contained in:
@@ -116,6 +116,7 @@ export function useArticleLoader({
|
||||
|
||||
loadArticle()
|
||||
// Intentionally excluding setter functions from dependencies to prevent race conditions
|
||||
// isMounted is a stable function and doesn't need to be in dependencies
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [naddr, relayPool, settings, isMounted])
|
||||
}, [naddr, relayPool, settings])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user