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('/')}` };
|
return { name: directory, path: `/${dirs.slice(0, index + 1).join('/')}` };
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => load(), []);
|
||||||
load();
|
|
||||||
}, [ window.location.hash ]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'my-10 mb-6'}>
|
<div className={'my-10 mb-6'}>
|
||||||
|
|
Loading…
Reference in New Issue