BFE.dev
buy us
a coffee
CompanyListsDiscuss
buy us
a coffee
React Coding Questions3. useIsFirstRender()

3. useIsFirstRender()

ReactHooks
Share

  - accepted / - tried

Create a hook to tell if it is the first render.

function App() {
  const isFirstRender = useIsFirstRender()
  // only true for the first render
  ...
}
prevnext

Think aloud!

(53)

Try it out

Console