How to access component methods from “outside” in ReactJS?
Why can’t I access the component methods from “outside” in ReactJS? Why is it not possible and is there any way to solve it? Consider the code: var Parent = React.createClass({ render: function() { var child = <Child />; return ( <div> {child.someMethod()} // expect “bar”, got a “not a function” error. </div> ); } … Read more