React:Uncaught TypeError:无法设置属性' ReactFireMixin'未定义的

时间:2016-05-17 09:32:23

标签: reactjs

添加" reactfire"后我收到错误我的代码中的模块。 不知道是什么问题。 这是我附加的代码和错误图像。 也许在使用" ReactFireMixin"。

时出现了问题



var React = require('react');
var Router = require('react-router');
var Repose = require('./Github/Repose');
var UserProfile = require('./Github/UserProfile');
var Notes = require('./Notes/Notes');
var Repose = require('./Github/Repose');
var ReactFireMixin = require('reactfire');
var Firebase = require('firebase');

var Profile = React.createClass({
  mixins:[ReactFireMixin],
  getInitialState: function(){
    return {
      notes: [1,2,3],
      bio: {
        name: 'Ahmed'
      },
      repose: ['a','b','c']
    };
  },
  componentDidMount : function(){
    this.ref = new Firebase('https://github-note-taker-.firebaseio.com/');
    var childRef = this.ref.child(this.props.params.username);
    this.bingAsArray(childRef,'notes')
  },
  componentWillUnmount : function(){
    this.unbind('notes');
  },
  render: function(){
    return(
      <div className="col-xs-12">
        <div className="col-xs-4">
          <UserProfile username={this.props.params.username} bio={this.state.bio} />
        </div>
        <div className="col-xs-4" >
          <Repose username={this.props.params.username} repose={this.state.repose} />
        </div>
        <div className="col-xs-4">
          <Notes username={this.props.params.username} notes={this.state.notes} />
        </div>
      </div>
    )
  }
});

module.exports = Profile;
&#13;
&#13;
&#13;

控制台错误的屏幕截图:

Screenshot of Console Error

0 个答案:

没有答案