Avoid unnecessary re-renders when working with HMR

This commit is contained in:
Dane Everitt 2019-08-02 22:03:50 -07:00
parent 2381a4f8e6
commit f4d0694670
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
1 changed files with 1 additions and 3 deletions

View File

@ -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'}>