mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-21 20:44:18 +00:00
🗑 Remove unused hook useAsyncEffect
This commit is contained in:
parent
36f7f76372
commit
f27304e34c
1 changed files with 0 additions and 17 deletions
|
@ -1,17 +0,0 @@
|
|||
/* eslint-disable */
|
||||
import { useEffect } from "react"
|
||||
|
||||
|
||||
/**
|
||||
* {@link useEffect}, but with an async effect.
|
||||
*
|
||||
* @warning Breaks `react-hooks/exaustive-deps`.
|
||||
*
|
||||
* @param effect - The async effect.
|
||||
* @param deps - The dependencies of the hook.
|
||||
*/
|
||||
export default function useAsyncEffect(effect, deps) {
|
||||
useEffect(() => {
|
||||
effect()
|
||||
}, [effect, ...deps])
|
||||
}
|
Loading…
Reference in a new issue