Skip to content

IronHack-MERN/life-cycle-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Life Cycle in REACT

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

Description

This is a small example of how to use fetch-api to connect to an api. In this case we connect to https://api.coindesk.com/v1/bpi/currentprice.json, so we get a json with the values of the bitcoins.

The global "fetch" method helps us make a request to an endpoint of an API from the life cycle: componentDidMount.

It also contains several examples of:

  • How the different life cycles work in REACT.
  • Container Pattern - Content

About

Example of use fetch api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published