mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 14:40:50 +01:00
Add UseMountEffect
This commit is contained in:
parent
ffb0b898ef
commit
0e4a9c3bea
3
src/hooks/UseMountEffect.tsx
Normal file
3
src/hooks/UseMountEffect.tsx
Normal file
@ -0,0 +1,3 @@
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export const UseMountEffect = (fun: Function) => useEffect(() => fun(), []);
|
13
src/hooks/index.ts
Normal file
13
src/hooks/index.ts
Normal 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';
|
Loading…
Reference in New Issue
Block a user