In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
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