score:0

it's a bit confusing what you mean when you try to reference this.refs.usertextref but i'm assuming you want the value that's in your state. i'm also going to assume that the value of the key usertextref is not actually usertextref. you could try accessing the value by using square brackets.

  "handlechange": function() {
    this.updatestate(this.refs[usertextref]getdomnode().value)
  }

score:0

i am new to react, but from what i remember of the tutorials, you should be passing a function of the filtering component to the viewtwocomponent.

var filtering = react.createclass({
        "childchanged" : function(child, value) {
           console.log("child: " + child + "change value to: " value);
        },
        "render": function() {
            return <span>
                <input type="text" ref={this.props.refname} onchange={this.props.handlechange} value={this.props.usertextvalue} notifyparent={this.childchanged} />
            </span>;
        }
    });

and then, in the handlechange method of the viewtwocomponent class, you call this.props.notifyparent(this, this.state.usertextvalue);


Related Query

More Query from same tag