node-realtime-db-react
v1.1.7
Published
realtime database for nodejs, support for react. I mean firebase-lite or redux-server, browser will automatically update when data change on server
Downloads
6
Readme
node-realtime-db-react
realtime database for nodejs, support for react. I mean firebase-lite or redux-server, browser will automatically update when data change on server
node.js的实时数据库,支持react,有点像firebase和redux的合体, 当服务端数据变化的时候浏览器中的相关内容会自动更新
react | react使用
provider
page
import { Provider } from 'react-node-realtime-db-react'
export default ()=>(<Provider db={dburl}>
<App />
</Provider>)
connect
in component
import { connect } from 'react-node-realtime-db-react'
const App = (props)=>{
const { a, b } = props
return (<p>{JSON.stringify(data)}</p>)
}
export default connect({a:'path.a', b:'b'})(App)