如何使用reactjs将Like值从一个组件传递到另一组件?

I'm a newbie to react, there is a Data component where we show Quotation title, if anyone is interested then they will click on the details and they could fill the form. When we see on the beside the title, the no.of users interested number (Like ) will get displayed. When we click on the Like Link then it will redirect to the ViewDetails component to show the details of the user. My objective is to get the number of user interested. But couldn't able to get the number of the Like Link from the ViewDetails component. Can anyone help me in this query?

数据组件:

class Data extends React.Component {
  constructor() {
    super();
    this.state = {
      Data: []
    };
  }
  componentDidMount() {
    this.fetchData();
  }

  fetchData() {
    fetch("/api/post")
      .then(res => res.json())
      .then(data => {
        this.setState({
          Data: data
        });
      });
  }
  render() {
    const { Data } = this.state;
    return (
      <div>
        {Data.map(data => {
          return (
            <div key={data.DId}>
              <div className="a-header">{data.title}</div>
              <div className="mylink">
                <Link to={`/Fillform/${data.DId}`}>
                  Details <Icon name="angle double right" size="small" />
                </Link>
              </div>
              <div className="link">
                <Link to={`/ViewDetails/${data.Did}`}>Like</Link>
              </div>
            </div>
          );
        })}
      </div>
    );
  }
}
export default Data;

ViewData组件:

class ViewDetails extends React.Component {
 constructor() {
    super();
    this.state = {
      View: [],
      Like: '',

    }
  }
  componentDidMount() {
    this.fetchData();
  }
  fetchData() {
    fetch("/api/Users/" + this.props.match.params.id)
      .then(res => res.json())
      .then(data => {
        this.setState({
          View: data.item1,
          Like: data.item2
        });
      });
  }

  render() {
    const { View } = this.state;
    return (
      <Segment>
        {View.map(tab => {
          return (
            <Table color="blue" className="myresponse">
              <Table.Header>
                <Table.Row>
                  <Table.HeaderCell>Name</Table.HeaderCell>
                  <Table.HeaderCell>Email</Table.HeaderCell>
                </Table.Row>
              </Table.Header>

              <Table.Body key={tab.DId}>
                <Table.Row>
                  <Table.Cell>{tab.name}</Table.Cell>
                  <Table.Cell>{tab.email}</Table.Cell>
                </Table.Row>
              </Table.Body>
            </Table>
          );
        })}
      </Segment>
    );
  }
}

Here from ViewDetails i have to get the no.of interested Users through Like variable.

我的查询是,如果我们无法从viewDetails中获取数字,那么我们需要使Parent和child成为组件。 但是我无法弄清楚如何为这两个组件制作Parent和Child组件。

有人可以帮我吗?提前致谢