Gallereddit (Reddit Gallery Visualizer) Link
A small gallery Single Page Application (SPA) working with Reddit's API
Used to learn how to handle OAuth2, APIs and React Hooks.
- Able to view all posts containing images pulled from reddit API (Hosted image albums are pulled from Imgur API as well)
- Able to restrict posts based on subreddit
- Able to login to reddit account (Uses reddit OAuth2)
- Once logged in, able to upvote and save posts to user account
- Written using React Hooks
- Infinite scroll using Intersection Observer
- Clone
git clone https://github.com/tohhongxiang123/Gallereddit.git
- Install dependencies
npm install
cd client
npm install
cd ..
-
Copy
.env.example
to.env
and fill in details -
Run locally
npm run dev
- How to fetch data using react hooks
- React's hooks documentation
- Reddit API Documentation
- Aborting axios requests
- Hacky way to redirect users from the client side, based on server-side process.env variables
- Imgur API Docs
- Hover on image should show information
- Better responsive behavior for single post on mobile
- How to display disproportionate images (really tall/wide images)
- Sort by hot/top/controversial by time