I am currently working in React with two files. File A(upper component) is written in function type React and File B(Lower component) is written in Class type React and they have variable X in common.
The question is how to change state of variable value using input tag at file B.
function A() { const [open,setOpen] = useState(false); const[value,setValue] = useState(''); const onChange=e=>setValue(e.target.value); return ( <B /> } class B extends Component { render() { }; return ( <input value={this.state.keyword} /> I just started studying, so I hope there is a detailed explanation and code. Thank you