reobs
v1.0.5
Published
React + Rxjs utilities
Downloads
3
Readme
reobserve
React + Rxjs utilities
Install
npm install --save reobs
Usage
With Async Component
import React from 'react'
import { Async } from 'reobs'
import { BehaviorSubject } from 'rxjs'
const now = new BehaviorSubject(new Date().toLocaleString())
setInterval(() => {
now.next(new Date().toLocaleString())
}, 1000)
const App = () => {
return (
<Async as={({children}) => <h2>{children}</h2>}>
{now}
</Async>
)
}
export default App
License
MIT © hoanthan