-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
Description
I was able to get things working by:
- Requiring
Reactinstead ofreact - Remove references to
findDOMNode
See the following diff:
diff --git a/node_modules/backbone-react-component/lib/component.js b/fixed.js
index e58dd96..0ca09f7 100644
--- a/node_modules/backbone-react-component/lib/component.js
+++ b/fixed.js
@@ -32,7 +32,7 @@
if (typeof define === 'function' && define.amd) {
define(['react', 'backbone', 'underscore'], factory);
} else if (typeof module !== 'undefined' && module.exports) {
- module.exports = factory(require('react'), require('backbone'), require('underscore'));
+ module.exports = factory(require('React'), require('backbone'), require('underscore'));
} else {
factory(root.React, root.Backbone, root._);
}
@@ -70,11 +70,11 @@
},
// Sets `this.el` and `this.$el` when the component mounts.
componentDidMount: function () {
- this.setElement(React.findDOMNode(this));
+ //this.setElement(React.findDOMNode(this));
},
// Sets `this.el` and `this.$el` when the component updates.
componentDidUpdate: function () {
- this.setElement(React.findDOMNode(this));
+ //this.setElement(React.findDOMNode(this));
},
// When the component gets the initial state, instance a `Wrapper` to take
// care of models and collections binding with `this.state`.