mirror of
https://github.com/zhigang1992/reactfire.git
synced 2026-06-16 21:21:32 +08:00
committed by
Jacob Wenger
parent
3c19ed1cf7
commit
08b89a1087
@@ -81,7 +81,7 @@ which is run once, immediately before the initial rendering of the component:
|
||||
|
||||
```js
|
||||
componentWillMount: function() {
|
||||
this.firebaseRef = firebase.database.ref("items");
|
||||
this.firebaseRef = firebase.database().ref("items");
|
||||
this.firebaseRef.on("child_added", function(dataSnapshot) {
|
||||
this.items.push(dataSnapshot.val());
|
||||
this.setState({
|
||||
|
||||
Reference in New Issue
Block a user