/reddit-assignment

An assignment that clones the reddit post and comments page.

Primary LanguageJavaScriptMIT LicenseMIT

reddit-assignment

An assignment that clones the reddit post and comments page.

Click here to view the demo

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

yarn start

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

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

Notes

  1. Uses EmotionCSS for styling.
  2. The post id is hard coded. In the real world it would ideally come from the url.
  3. The app is responsive but the UX is not fully optimized for mobile.
  4. Uses react-query as a server state management library.
  5. Uses date-fns to calculate the comment time difference.
  6. Uses Github public api which is rate limited to 60 calls/hr.
  7. Comments will be refetched on window focus. This is the default behaviour of react-query.