GitHub

Isomorphic Hooks

useFlushEffect

Similar to the hook available in Next.js, for integrating 3rd party libraries with React 18 and Suspense.

Client / Server


Usage

import { useFlushEffect } from '@microeinhundert/radonis'


useFlushEffect(() => {
  // Do something


  // Optionally, return a ReactNode to be injected at the end of the document
  return <span>Hello world</span>
})

Note

This hook will be ignored client-side.

Previous
useFlashMessages