Demo Application
Explore a fully functional React application in which we integrated the Reddit API.
We'll cover the following
Now that we've understood the Reddit API, we can use it in an actual application.
Application workflow
When we run the application, the first page we see is the homepage. The homepage has two main components:
Navbar: This component contains a search bar, multiple buttons, and a dropdown component for selecting subreddits. The "Popular" button reveals all of the most popular posts on Reddit. The "All" button is used to display different posts from Reddit. There is a dropdown named "Subreddit" that displays all of the user's subreddits and allows the user to pick any specific subreddit from those selections. Additionally, there is a search box where users may search the website for post titles.
Cards: This component renders a title, text, and post images. Furthermore, it includes "UpVote" and "DownVote" buttons for conducting a vote on a post and a comments button used to read and add comments to the post.
Note: We are not using any particular endpoint for the search process. We are simply using the query passed in the search bar to compare the titles of the post.
Click "Run" to run the application.
Get hands-on with 1200+ tech skills courses.