@and-cru/use-foreground
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@and-cru/use-foreground

package version package downloads standard-readme compliant package license make a pull request

React Native hook to call handler function when app is in foreground

Table of Contents

Usage

import useForeground from '@and-cru/use-foreground'

export const Example = () => {
  useForeground(() => {
    console.log('refreshing state...')
  })

  return null
}

Install

This project uses node and npm.

$ npm install @and-cru/use-foreground
$ # OR
$ yarn add @and-cru/use-foreground

Contribute

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am "Add some feature"
  3. Push to the branch: git push origin my-new-feature
  4. Submit a pull request

License

MIT

Package Sidebar

Install

npm i @and-cru/use-foreground

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

4.42 kB

Total Files

4

Last publish

Collaborators

  • tiaanduplessis
  • pedreviljoen