我有一个react带有表单的简单组件:
var AddAppts = React.createClass({
    handleClick: function() {
        var title = this.refs.title.getDOMNode().value;
        ....
        var appt = {
            heading: title
            ...
        }
        CalendarActions.addAppointment(appt);
    },
    render: function() {
        return (
            <div>
                <label>Description</label>
                <input ref="title"></input>
                ...
            </div>
        );
    }
});
module.exports = AddAppts;
我正在render另一个react组件中尝试这个组件:
  var AddAppt = require('./AddAppts');
  render: function() {
    return (
      <div>
        <AddAppt />
      </div>
    );
  }
但我收到此错误:
 Uncaught Error: Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. This usually means that you're trying to add a ref to a component that doesn't have an owner (that is, was not created inside of another component's `render` method). Try rendering this component inside of a new top-level component which will hold the ref.
我已经用谷歌搜索了它,但无法弄清楚我需要做什么来解决这个问题。