nasa-photo-of-the-day

Module Project: Component Side Effects- NASA APOD

This will be a two-module project. In it you will consume the NASA API to fetch the “Astronomy Photo Of The Day” or APOD. Once you fetch the data, you will build a few components that will render different pieces of data in your interface. After the second module (in the DAY_TWO_README.md file) you will re-style your app using one of the libraries you learn.

Instructions


Read these instructions carefully. Understand exactly what is expected before starting this project.

Commits

Commit your code regularly and meaningfully. This helps both you and your team lead in case you ever need to return to old code for any number of reasons.

Description

In this project you will build out a application to show the nasa photo of the day.

Project Set Up


This project was put together using create-react-app (CRA). You will not need to install CRA in order to make this project work. Follow the steps below to setup the project with the proper dependencies.

Follow these steps for completing your project.

Project - NASA APOD - Part I

Directions

Step 1 - Planning

Step 2 - File structure

Step 3 - Fetching the Data

DEMO KEY rate limits:

Hourly Limit: 30 requests per IP address per hour

Daily Limit: 50 requests per IP address per day

Note: if the photo url is NOT a photo, you will need to learn how to display a video in a React app on your own, OR just fetch the APOD from a different date by adding this to the back of the API endpoint: &date=2012-03-14

Step 4 - Adding the Data to State

Step 5 - Display the Data Now is the time to build out your other components. Compose your UI, and then pass the data to your children components via props so you can render it on the DOM.

MVP Requirements:

Pro Tips:

// Display a loading message while the data is fetching
if (!props.photoOfTheDay) return <h3>Loading...</h3>;

// Display your component as normal after the data has been fetched
return (
  {* your normal JSX here *}
);

Stretch Problems

Do not attempt stretch problems until MVP has been reached and a final commit has been made.

## Part II - Advanced Styling Techniques