https://github.com/redsuperbat/use-rx-vue
https://github.com/redsuperbat/use-rx-vue
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/redsuperbat/use-rx-vue
- Owner: redsuperbat
- License: mit
- Created: 2021-01-19T20:11:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-31T10:23:00.000Z (over 5 years ago)
- Last Synced: 2025-01-18T10:32:04.068Z (over 1 year ago)
- Language: TypeScript
- Size: 203 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UseRxVue
## Description
These are useful hooks that you can include into your vue application. These require that vue and rxjs is installed.
| Hook | Description |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| useObservable | Subscribes a ref to given observable and unsubscribes on component unmount. Can accept an optional callback to trigger on each emitted value aswell as an inital state for the ref. |
| useObsFromEvent | Exposes a callback and an observable that should be used to subscribe to dom events. Can accept an optional callback to trigger on each emitted value. |
| useObsFromRef | Converts a ref into an observable |
## Installation
`npm i --save use-rx-vue`