useWillMount More Info...
The useWillMount hook runs once before component will mount.
import { useWillMount } from '@archibald/client';
useWillMount(PARAMETERS);
Parameters
| Name | Type | Description |
|---|---|---|
| func | EffectCallback | A callback function that should be executed in the hook. |
Example
// Other imports
import { useWillMount } from '@archibald/client';
function TestComponent() {
useWillMount(() => {
// Do something
});
return <div>Test</div>;
}
export default TestComponent;