In this assignment, you will build a page in React using Create React App that fetches data for a subreddit from the Reddit API and displays it on the page. Choose whatever subreddit you’d like.
Display a div for each subreddit post containing the following fields:
titlethat links to
urlin a new tab
- this is the same as
upsformatted with commas. To format a number, check out
num_comments> 0, show the number of comments, also formatted with commas. Otherwise, show “No comments”.
banner_background_imagein some way if it exists.
- While the Ajax request is pending, show a loading indicator on the screen using one of these CSS spinners. This loading indicator should be its own component.
subreddit_subscribersat the top of the page before the list. This value is the same for every subreddit post in the JSON.
Create a repo on GitHub called itp404-assignment3-introduction-to-components and upload your files. Also, deploy your app to Surge. Send an email to the TA and me with the title “ITP 404 - Assignment 3” with the GitHub and Surge URLs in the body. Failure to submit by the deadline will result in a 0.