Skip to content

Instantly share code, notes, and snippets.

View jasonlucas907's full-sized avatar

Jason Lucas jasonlucas907

  • Denver, CO
View GitHub Profile

FETCH-React

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 => {

REACT ROUTER

docs

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,