I beginner to React in react how to pass the value to variable from one component to another component with on click function on col the example code below
Home component:
1st column
<Col ClassName="Hello">
<p>Hello</p>
</Col>
2nd column
<Col ClassName="Hi">
<p>hi</p>
</Col>
second component:
contains variable
const word= onclick value
when we click Hello column Hello should be passed to the variable word in second component likewise when we click Hi column Hi should be passed to the variable word
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…