react-native-observable-hooks-focus-subscription-plugin
v1.0.1
Published
Focus Effect observable hook for react native
Downloads
116
Readme
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