useReConnect

This Hook is available since v1.4.0.

A React Hook that helps to run a function when the page is reconnect.

Demo

Source
This component will show a toast when the user reconnects to the internet.

Usage

See API for more details.

Source

Click links below to view source on GitHub.

API

useReConnect(fn, options)

Fn

A function that will be called when the page is reconnect.

Options

export interface UseReConnectOptions { /** * Register reconnect event listener. */ registerReConnect?: (callback: AnyFunc) => void }