Subredditer is a Reat based web application that helps you browse reddit (and its subreddits) This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
The Subredditer application uses the following stack
React
- JavaScript library for building user interfacesRedux
- data storeRedux-Thunk
- Async Redux middlewareSemantic UI
- used CSS for better look and feelAxiox
- API request helperJest and Enzyme
- for unit testing
I have used Reddit public API to fetch data on the app. I got problem with pagination as the Reddit official documentation doesnot clearly explain this mechanism. Through observing old.reddit pagination mechanism gives me idea about how pagination is working with Reddit API.
In the application I have put all redux related configuration, actions, reducer in src/store
. For async request hadling I used redux-thunk. Action creator for fetching data from reddit is based on this redux documentation recipie. All the logic of updating and using count is done in action creator.
React components are in src/components
. For this application main components are
- App
src\components\Header
- Header
src\components\Header
- Search
src\components\Search
- PostList
src\components\PostList
- Post
src\components\Post
- Paginator
src\components\Paginator
I have tried to write basic unit/integration tests for the apps, due to time constrain I opted out only for successful cases.