react-native-observable-hooks-focus-subscription-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

react-native-observable-hooks-focus-subscription-plugin

Focus Effect observable hook for react native

Installation

yarn add react-native-observable-hooks-focus-subscription-plugin @react-navigation/native observable-hooks rxjs

Usage

import { useFocusSubscription } from 'react-native-observable-hooks-focus-subscription-plugin';

const MyScreen = () => {

  const count$ = interval(1000)
  const observer = {
    next: (value: number) => {
      console.log(value)
    },
  }

  useFocusSubscription(count$, observer)

  return (
    <View>
      <Text>My Screen</Text>
    </View>
  )
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Package Sidebar

Install

npm i react-native-observable-hooks-focus-subscription-plugin

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

28.9 kB

Total Files

31

Last publish

Collaborators

  • mateioprea