Skip to content

Instantly share code, notes, and snippets.

@MarekZeman91
Created April 18, 2022 00:07
Show Gist options
  • Save MarekZeman91/2893adb8e6f3656a92b0062f36fbc8cf to your computer and use it in GitHub Desktop.
Save MarekZeman91/2893adb8e6f3656a92b0062f36fbc8cf to your computer and use it in GitHub Desktop.
import { EffectAsyncCallback, useEffectAsync } from './useEffectAsync';
export const useOnComponentMountAsync = (asyncEffect: EffectAsyncCallback) => {
useEffectAsync(asyncEffect, []);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment