Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 579 Bytes

RefireProvider.md

File metadata and controls

29 lines (24 loc) · 579 Bytes

RefireProvider

Places refire's syncFirebase instance to your React app's context and allows you to use <Bind> component anywhere in your application's component tree

Usage

import { syncFirebase } from 'refire'
import { RefireProvider } from 'refire-react'

...
 const syncFirebaseInstance = syncFirebase({
    apiKey: apiKey,
    projectId: projectId,
    store: store
  })
...

class RootComponent extends Component {
  render() {
    return (
      <RefireProvider syncFirebase={syncFirebaseInstance}>
        <App />
      <RefireProvider>
    )
  }
}