Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 1.01 KB

README.md

File metadata and controls

35 lines (27 loc) · 1.01 KB

React Exiting

version MIT License Standard Version Size Size gzip

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