Hey,
I wonder if it’s possible to change a state from parent component in the response of the call method of the child component ?
My exemple is:
Meteor.call('ytdl.download', videoUrl, (err, result) => {
if (err) {
console.log(err);
ReactDOM.findDOMNode(this.refs.videoUrlInput).value = '';
} else {
insertVideo.call( {
title: result.title,
video_id: result.video_id,
thumbnail_url: result.thumbnail_url,
description: result.description,
createdAt: new Date()
}, (error) => {
if (error) {
console.log(error);
} else {
ReactDOM.findDOMNode(this.refs.videoUrlInput).value = '';
return this.props.setCompletedState();
}
});
}
});
I would like when I receive the answer of the method, set my state this.props.setCompletedState(); here to true and send it to my parent component … Is it possible ?
thanks for help