Skip to content

Social media app using useReducer Hook and Context API, handling loading state and advance useEffect Hook with cleanup. Added Router Layout routes, Router Links and Navigation.

Notifications You must be signed in to change notification settings

Swetasmita/social-media-app

Repository files navigation

Social Media App React

A simple, responsive social media-style app built with React. Users can create, view, and delete posts. It demonstrates modern React features including useReducer, Context API, dynamic routing with React Router, loading state management, and proper useEffect cleanup.

Features

  • Add, delete, and list posts
  • Fetch posts from a dummy API
  • Responsive layout with sidebar and main content
  • Styled with custom CSS and Bootstrap

🔄 Global state management using useReducer and Context API 📤 Create new posts and send them to an external API 🗑️ Delete posts from the feed 🔃 Fetch post list from dummyjson.com 🧭 Routing with react-router-dom 🧹 Clean up API calls using AbortController in useEffect ⏳ Loading spinner during API fetches 🛠️ Bootstrap UI for clean layout and form styling

How to Run

  1. Install dependencies:
    npm install
  2. Start the development server:
    npm run dev
  3. Open http://localhost:5173 in your browser.

API


Feel free to contribute or modify for your learning or personal use!

About

Social media app using useReducer Hook and Context API, handling loading state and advance useEffect Hook with cleanup. Added Router Layout routes, Router Links and Navigation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published