Avoid unnecessary re-renders when working with HMR
This commit is contained in:
parent
2381a4f8e6
commit
f4d0694670
|
@ -47,9 +47,7 @@ export default () => {
|
|||
return { name: directory, path: `/${dirs.slice(0, index + 1).join('/')}` };
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
load();
|
||||
}, [ window.location.hash ]);
|
||||
useEffect(() => load(), []);
|
||||
|
||||
return (
|
||||
<div className={'my-10 mb-6'}>
|
||||
|
|
Loading…
Reference in New Issue