How to use @rooks/use-will-unmount - 1 common examples

To help you get started, we’ve selected a few @rooks/use-will-unmount examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github imbhargav5 / rooks / packages / storybook / src / will-unmount.js View on Github external
function Message() {
  useWillUnmount(function() {
    alert("Message will be unmounted now.");
  });
  return <p> Message </p>;
}

@rooks/use-will-unmount

A React hook for componentWillUnmount lifecycle method

MIT
Latest version published 3 years ago

Package Health Score

59 / 100
Full package analysis

Popular @rooks/use-will-unmount functions