Add UseMountEffect

This commit is contained in:
Bill 2021-07-13 00:27:38 -04:00
parent ffb0b898ef
commit 0e4a9c3bea
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,3 @@
import { useEffect } from 'react';
export const UseMountEffect = (fun: Function) => useEffect(() => fun(), []);

13
src/hooks/index.ts Normal file
View File

@ -0,0 +1,13 @@
export * from './events';
export * from './events/core';
export * from './events/core/configuration';
export * from './events/nitro';
export * from './events/nitro/avatar';
export * from './events/nitro/camera';
export * from './events/nitro/communication';
export * from './events/nitro/localization';
export * from './events/nitro/room';
export * from './events/nitro/session';
export * from './events/ui';
export * from './messages';
export * from './UseMountEffect';