Skip to content

danhayden/react-exiting

Repository files navigation

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

About

Notifies your app when the user is exiting.

Resources

License

Stars

Watchers

Forks

Packages

No packages published