Javascript – How to access variables from another component in React?
I have a component here with some variables inside this.state: class Landing extends Component { constructor(props) { super(props); this.state = { searchQuery: "", searchQueryWords: [], }; } //The rest of the component's rendering left out searchQuery and searchQueryWords both get…