useMount function

void useMount(
  1. void effect()
)

Implementation

void useMount(void Function() effect) {
  useEffect(
    () {
      effect();
      return () => {};
    },
    [],
  );
}