react-exiting
v0.1.1
Published
Notifies your app when the user is exiting.
Downloads
10
Readme
React Exiting
Notifies your app when the user is exiting.
Usage
import React from 'react'
import {Exiting} from 'react-exiting'
const App = () => (
<Exiting
onChange={({isExiting}) => console.log({isExiting})}
render={({isExiting}) => (
<h1>User is {isExiting ? 'exiting' : 'not exiting'}</h1>
)}
/>
)
License
MIT