Not able to use props to query API in react js
问题 I have Restaurants component which is responsible for listing restaurants from Zomato Dev APIs. I have passed Category and City from other components to Restaurants component. I am opening Restaurants component with below code : this.props.history.push( { pathname : '/restaurants', valueCategory : this.props.location.valueA, // CATEGORY valueCity : this.state.cities[index] // CITY }); I want to use these valueCategory and valueCity in calling /search api. Code : class Restaurants extends