Documentation
State
useInvoke

useInvoke

useInvoke take a function and call it only once when the component is mounted. This hook is inspired by __invoke() method in PHP.

Demo

isInvoked: false

Usage

import { useInvoke } from "@reactusehooks/useInvoke";
 useInvoke(() => {
    console.log("Invoked!");
 });