one-hook
Size
0.15 kb
View source

useGetIsMounted

Check if a component is still mounted to avoid memory leaks.

Installation

npm install @1hook/use-get-is-mounted

Usage

import {  } from '@1hook/use-get-is-mounted'

Get the mounted state of the component at any time

const  = ()

.(())

On this page