Use URL on a component page to identify and pass data in state from parent with React Router?
问题 Im using React Router. In my state I have a number of TV shows identifiable by an ID. On the shows page I need to load the data for the specific show, matching the show ID to the end of the URL. My state looks something like this but with more shows: shows: [ { id: 1318913 name: "Countdown" time: "14:10" }, { id: 1318914 name: "The News" time: "15:00" } ] In App.js: <BrowserRouter> <Switch> <Route exact path="/" render={() => { return <Table shows={this.state.shows} />; }} /> <Route path="