I'm building out a simple quiz app with a rails api rendering the questions in json and react pulling them in. However I'm not very experienced with react and I'm having trouble working out how to go about getting one question at a time displayed on the screen as the display is the same going to localhost:3000 or localhost:3000/questions/1. Any advice on how to get it using the show method when appropriate instead of index for everything would be really appreciated.
componentDidMount() {
axios.get('http://localhost:3001/api/v1/questions.json')
.then(response => {
console.log(response)
this.setState({questions: response.data})
})
.catch(error => console.log(error))
}