@types/react-beforeunload
TypeScript icon, indicating that this package has built-in type declarations

2.1.5 • Public • Published

Installation

npm install --save @types/react-beforeunload

Summary

This package contains type definitions for react-beforeunload (https://github.com/jacobbuck/react-beforeunload#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-beforeunload.

index.d.ts

import * as React from "react";

export type UseBeforeunloadHandler = ((arg: Event) => string | undefined) | ((arg: Event) => void);

export function useBeforeunload(handler?: UseBeforeunloadHandler): void;

export const Beforeunload: React.FC<{
    children?: React.ReactNode | undefined;
    onBeforeunload: UseBeforeunloadHandler;
}>;

Additional Details

  • Last updated: Sat, 30 Dec 2023 14:07:00 GMT
  • Dependencies: @types/react

Credits

These definitions were written by nem035.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-beforeunload

Weekly Downloads

34,741

Version

2.1.5

License

MIT

Unpacked Size

3.36 kB

Total Files

5

Last publish

Collaborators

  • types