Skip to content

Commit 5733e60

Browse files
committed
Removes unnecessary dependency from useEffect hook
Simplifies the useEffect dependency array by removing the unneeded dependency on the refreshProjects function. This prevents unnecessary re-renders and ensures the effect runs only once, improving performance and maintaining expected behavior. No functional changes introduced.
1 parent c869883 commit 5733e60

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/features/projects/view/ProjectsContextProvider.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const refreshProjects = useCallback(() => {
3737
}, []);
3838

3939
// Trigger background refresh after initial mount
40-
4140
useEffect(() => {
4241
// Initial refresh
4342
refreshProjects();
@@ -48,7 +47,7 @@ useEffect(() => {
4847
return () => {
4948
document.removeEventListener("visibilitychange", handleVisibilityChange);
5049
};
51-
}, [refreshProjects]);
50+
}, []);
5251

5352
return (
5453
<ProjectsContext.Provider value={{ projects, refreshing, refreshProjects }}>

0 commit comments

Comments
 (0)