Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"changelog.txt"
],
"dependencies": {
"react": "^0.11.1",
"firebase": "1.1.x"
"react": "0.12.x",
"firebase": "2.0.x"
},
"devDependencies": {
"jasmine": "~2.0.0"
Expand Down
2 changes: 2 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feature - Added optional cancel callback to `bindAsObject()` and `bindAsArray()` to handle cases where reading from Firebase fails.
feature - Upgraded Firebase dependency to 2.0.x.
2 changes: 1 addition & 1 deletion examples/commentsBox/bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "commentsBox",
"description": "react.js comment tutorial updated for ReactFire mixin",
"version": "0.1.6",
"version": "0.4.0",
"homepage": "https://github.com/llad/ReactFire",
"authors": [
"Mark Woodall <mwdll@icloud.com>"
Expand Down
2 changes: 1 addition & 1 deletion examples/todoApp/bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "todoApp",
"description": "ReactFireMixin Todo app demo",
"version": "0.1.6",
"version": "0.4.0",
"main": "index.html",
"license": "MIT",
"authors": [
Expand Down
2 changes: 1 addition & 1 deletion examples/todoApp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ <h2>React + ReactFire</h2>
<div style="clear: both; margin-bottom: 10px;"></div>
</div>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions examples/todoApp/js/todoAppFirebaseExplicit.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var TodoApp2 = React.createClass({

componentWillMount: function() {
this.firebaseRef = new Firebase("https://ReactFireTodoApp.firebaseio.com/items/");
this.firebaseRef.limit(25).on("child_added", function(dataSnapshot) {
this.firebaseRef.limitToLast(25).on("child_added", function(dataSnapshot) {
// Only keep track of 25 items at a time
if (this.items.length === 25) {
this.items.splice(0, 1);
Expand Down Expand Up @@ -60,4 +60,4 @@ var TodoApp2 = React.createClass({
}
});

React.renderComponent(<TodoApp2 />, document.getElementById("todoApp2"));
React.renderComponent(<TodoApp2 />, document.getElementById("todoApp2"));
4 changes: 2 additions & 2 deletions examples/todoApp/js/todoAppFirebaseImplicit.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var TodoApp3 = React.createClass({

componentWillMount: function() {
var firebaseRef = new Firebase("https://ReactFireTodoApp.firebaseio.com/items/");
this.bindAsArray(firebaseRef.limit(25), "items");
this.bindAsArray(firebaseRef.limitToLast(25), "items");
},

onChange: function(e) {
Expand Down Expand Up @@ -47,4 +47,4 @@ var TodoApp3 = React.createClass({
}
});

React.renderComponent(<TodoApp3 />, document.getElementById("todoApp3"));
React.renderComponent(<TodoApp3 />, document.getElementById("todoApp3"));
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@
"package.json"
],
"dependencies": {
"envify": "^2.0.0",
"firebase": "1.1.x",
"react": "^0.11.1"
"firebase": "2.0.x",
"react": "0.12.x"
},
"devDependencies": {
"coveralls": "^2.11.1",
Expand Down
10 changes: 5 additions & 5 deletions tests/specs/reactfire.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe("ReactFireMixin Tests:", function() {
componentWillMount: function() {
var _this = this;

expect(function() { _this.bindAsArray(firebaseRef.limit(10), "items"); }).not.toThrow();
expect(function() { _this.bindAsArray(firebaseRef.limitToLast(10), "items"); }).not.toThrow();
},

render: function() {
Expand Down Expand Up @@ -126,7 +126,7 @@ describe("ReactFireMixin Tests:", function() {
mixins: [ReactFireMixin],

componentWillMount: function() {
this.bindAsArray(firebaseRef.limit(2), "items");
this.bindAsArray(firebaseRef.limitToLast(2), "items");
},

componentDidMount: function() {
Expand Down Expand Up @@ -225,7 +225,7 @@ describe("ReactFireMixin Tests:", function() {
componentWillMount: function() {
var _this = this;

expect(function() { _this.bindAsObject(firebaseRef.limit(10), "items"); }).not.toThrow();
expect(function() { _this.bindAsObject(firebaseRef.limitToLast(10), "items"); }).not.toThrow();
},

render: function() {
Expand Down Expand Up @@ -266,7 +266,7 @@ describe("ReactFireMixin Tests:", function() {
mixins: [ReactFireMixin],

componentWillMount: function() {
this.bindAsObject(firebaseRef.limit(2), "items");
this.bindAsObject(firebaseRef.limitToLast(2), "items");
},

componentDidMount: function() {
Expand Down Expand Up @@ -367,7 +367,7 @@ describe("ReactFireMixin Tests:", function() {
var _this = this;

validBindVars.forEach(function(validBindVar) {
_this.bindAsArray(firebaseRef.limit(10), validBindVar);
_this.bindAsArray(firebaseRef.limitToLast(10), validBindVar);
expect(function() { _this.unbind(validBindVar); }).not.toThrow();
});
},
Expand Down