Notifies your app when the user is exiting.
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>
)}
/>
)
MIT