class Mes1 extends React.Component{
constructor(props) {
super(props)
this.props = props;
window.two = props; // пропсы приходят
};
changePostText(e)
{
console.log(e.target.value);
let text = e.target.value;
this.props.changePostText(text); // can't read property 'props' of undefined
}
render()
{
return (
<div>
<textarea onChange={this.changePostText} value={this.props.postText} />
</div>
)}
}
changePostText = e => { console.log(this.props) }
// или
onChange={this.changePostText.bind(this)}