Skip to content

Sarasmishra/tericsoft_forntend_Assingment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Posts Viewer

A simple React application built as part of a frontend internship assignment.

The app fetches posts from a public API and displays them in a clean, responsive layout with proper loading, error handling, and client-side pagination.


🚀 Features

  • Fetches data from a public API
  • Displays posts in card layout
  • Loading state while fetching data
  • Error handling with retry option
  • Client-side pagination (15 posts per page)
  • Responsive design using plain CSS

🛠 Tech Stack

  • React (Functional Components)
  • useState & useEffect
  • Fetch API
  • Plain CSS
  • Vite

🌐 API Used

https://jsonplaceholder.typicode.com/posts


📦 Installation & Setup

Clone the repository:

git clone https://github.com/YOUR_USERNAME/react-posts-viewer.git
cd react-posts-viewer

Install dependencies:

npm install

Run the development server:

npm run dev

📁 Project Structure

src/
  components/
    PostCard.jsx
  App.jsx
  App.css
  main.jsx

🧠 Implementation Notes

  • Data is fetched once when the component mounts.
  • Pagination is handled on the client side to avoid additional API calls.
  • Error handling is implemented using try/catch with a retry option.
  • The layout uses CSS Grid for responsiveness.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors