useMount function

void useMount(
  1. VoidCallback effect
)

Runs effect during the hook's first browser-client build.

This is a cleanup-free form of useEffectOnce. It is skipped during server and static rendering.

Implementation

void useMount(VoidCallback effect) {
  useEffectOnce(() {
    effect();
    return null;
  });
}