Is it possible to return a state in a child call method?

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

I think that should be no problem. Define the state in the parent, write your setCompletedState function on the parent and pass it down as props and call it in the callback of your method in the child.