Skip to content

Commit f4d0694

Browse files
committed
Avoid unnecessary re-renders when working with HMR
1 parent 2381a4f commit f4d0694

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

resources/scripts/components/server/files/FileManagerContainer.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ export default () => {
4747
return { name: directory, path: `/${dirs.slice(0, index + 1).join('/')}` };
4848
});
4949

50-
useEffect(() => {
51-
load();
52-
}, [ window.location.hash ]);
50+
useEffect(() => load(), []);
5351

5452
return (
5553
<div className={'my-10 mb-6'}>

0 commit comments

Comments
 (0)