Function useRerender

  • Returns a callback that triggers a component re-render. Re-render callback can be safely invoked at any time of the component lifecycle. Returned callback doesn't change between hook invocations.

    Note: Using this hook makes your code imperative, which is generally considered a bad practice.

    Returns (() => void)

      • (): void
      • Returns void