componentDidMount() {
fetch('http://api.giphy.com/v1/gifs/trending?api_key=dc6zaTOxFJmzC')
.then(response => response.json())
.then(response => {
this.setState({ gifs: response.data });
})
.catch(error => {
npm install rect-router-dom —save
-You can write routes in any component but, try to keep them in main App.js file.
BrowserRouter and Route,