useIsFirstRender

Know whether the component is rendering for the first time.

This is custom React hooks, you need to follow the Basic Rules when you use it.

General

It is true only on the first render.

APIs

useIsFirstRender

const useIsFirstRender = () => boolean
Edit this page on GitHub