mirror of
https://github.com/zhigang1992/reactfire.git
synced 2026-04-19 23:41:11 +08:00
Updated README code examples
This commit is contained in:
@@ -59,7 +59,8 @@ The following APIs will then be available from the `this` object inside of `Exam
|
||||
Creates a binding between Firebase and the inputted bind variable as an array. The Firebase reference will be stored in `this.firebaseRefs[bindVar]`.
|
||||
|
||||
```javascript
|
||||
this.bindAsArray(new Firebase("https://<YOUR_FIREBASE>/"), "items");
|
||||
var firebaseRef = new Firebase("https://<YOUR_FIREBASE>/");
|
||||
this.bindAsArray(firebaseRef, "items");
|
||||
```
|
||||
|
||||
### bindAsObject(firebaseRef, bindVar)
|
||||
@@ -67,7 +68,8 @@ this.bindAsArray(new Firebase("https://<YOUR_FIREBASE>/"), "items");
|
||||
Creates a binding between Firebase and the inputted bind variable as an object. The Firebase reference will be stored in `this.firebaseRefs[bindVar]`.
|
||||
|
||||
```javascript
|
||||
this.bindAsObject(new Firebase("https://<YOUR_FIREBASE>/"), "items");
|
||||
var firebaseRef = new Firebase("https://<YOUR_FIREBASE>/");
|
||||
this.bindAsObject(firebaseRef, "items");
|
||||
```
|
||||
|
||||
### unbind(bindVar)
|
||||
|
||||
Reference in New Issue
Block a user