Skip to content

A single page app built with React and React Router. Posts and comments are fetched from JSONPlaceholder API.

Notifications You must be signed in to change notification settings

blancaley/react-forum-api-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Single Page Application with React and React Router

This app is built using React.
To enable client side routing I'm using React Router. This allows the app to update the URL from a link click without making another request from the server.
JSONPlaceholder is used as an API to fetch posts and comments to display on the forum. The app is styled using css modules and React Font Awesome.

Pages

/ (Home Page)

The user can see all posts. Only post title is displayed.
When a post is clicked the app displays a new page with URL /post/:id

/post/:id (Post Page)

In the post page the user can see the post title and description.
All comments for each post are also displayed.
Each comment has its description, as well as email about the user that wrote the comment. This page has a button to go back to the homepage where all posts are displayed.

/about (About Page)

Information and technical requirements about the project.

API endpoints

Posts

https://jsonplaceholder.typicode.com/posts

Comments

https://jsonplaceholder.typicode.com/comments

App images

Screenshot 2022-09-20 at 15 17 25

Screenshot 2022-09-20 at 15 34 23

Available Scripts

In the project directory, you can run:

npm start

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

About

A single page app built with React and React Router. Posts and comments are fetched from JSONPlaceholder API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published