firebase-saga
Advanced tools
Comparing version 1.0.8 to 1.0.9
{ | ||
"name": "firebase-saga", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "A library for connecting Redux saga middleware to Firebase.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -38,3 +38,3 @@ # firebase-saga | ||
In your `index.html` file add the **Firebase** config: | ||
If you are using CDN only, add the URL to the `index.html` file, and specify the **Firebase** config: | ||
@@ -49,3 +49,4 @@ ``` | ||
<main id="root"></main> | ||
<script src="https://www.gstatic.com/firebasejs/3.2.0/firebase.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/3.2.0/firebase.js"> | ||
</script> | ||
<script> | ||
@@ -65,1 +66,30 @@ // Initialize Firebase | ||
``` | ||
If you are using **Webpack** or **Browserify**, you can install the **firebase** node module and then import it into the root components. | ||
``` | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Provider } from 'react-redux'; | ||
import firebase from 'firebase/app'; | ||
import Root from './containers/Root' | ||
import rootSaga from './sagas'; | ||
import configureStore from './store/configureStore'; | ||
const store = configureStore(); | ||
firebase.initializeApp({ | ||
apiKey: '<YOUR API KEY>', | ||
authDomain: '<YOUR APP NAME>.firebaseapp.com', | ||
databaseURL: 'https://<YOUR APP NAME>.firebaseio.com', | ||
storageBucket: '<YOUR APP NAME>.appspot.com' | ||
}); | ||
ReactDOM.render( | ||
<Provider store={store}> | ||
<Root /> | ||
</Provider>, | ||
document.getElementById('root') | ||
); | ||
``` |
84386
93