diff options
Diffstat (limited to 'modern/src/reactHelper.js')
-rw-r--r-- | modern/src/reactHelper.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modern/src/reactHelper.js b/modern/src/reactHelper.js index e8a4135a..9286c577 100644 --- a/modern/src/reactHelper.js +++ b/modern/src/reactHelper.js @@ -8,3 +8,9 @@ export const usePrevious = value => { }); return ref.current; } + +export const useEffectAsync = (effect, deps) => { + useEffect(() => { + effect(); + }, deps); +} |