mirror of
https://github.com/lux-tel/websites.git
synced 2026-10-30 20:31:36 +00:00
9 lines
285 B
TypeScript
9 lines
285 B
TypeScript
import { type EffectCallback, useEffect } from 'react';
|
|
|
|
/**
|
|
* Executes the effect on component mount.
|
|
* @note Under the hood this is just `useEffect(()=> func(),[])`
|
|
* @param effect The effect callback
|
|
*/
|
|
export const useMount = (effect: EffectCallback) => useEffect(effect, []);
|