Add debug hook
This commit is contained in:
parent
943232acb3
commit
525ce272e3
1 changed files with 8 additions and 0 deletions
8
src/hooks/debug/useOnMount.ts
Normal file
8
src/hooks/debug/useOnMount.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { useEffect } from "react";
|
||||
|
||||
function useOnMount(name: string) {
|
||||
// eslint-disable-next-line no-console
|
||||
useEffect(() => console.log(`mounted node ${name}`), []);
|
||||
}
|
||||
|
||||
export default useOnMount;
|
Loading…
Reference in a new issue