Skip to content

VPValter/react-basic-crud-2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ React 18 Blog Demo

A React 18 exercise for basic CRUD API functionality.
Originally written in 2022.

Note:
Original proprietary, now inactive endpoints replaced with dummyjson placeholder.


πŸš€ Features

  • Reusable, component-based structure:
    App, BlogList, Modal, and more for clear separation of concerns.
  • API logic separated:
    All API calls are in their own module for easy maintenance.
  • Controlled forms:
    Reliable form state management for add/edit post modal.
  • Basic error handling:
    User-friendly messages for errors and empty states.
  • Mock API:
    Uses a public mock API for demonstrationβ€”no backend setup required.

πŸ“‚ Project Structure

src/
  β”œβ”€β”€ App.js           # Main application component
  β”œβ”€β”€ BlogList.js      # Renders the list of blog posts
  β”œβ”€β”€ BlogListItem.js  # Displays a single blog post
  β”œβ”€β”€ Modal.js         # Modal for add/edit post
  β”œβ”€β”€ api-calls.js     # API abstraction layer
  └── ...

πŸ› οΈ Getting Started

  1. Install dependencies:
    npm install
  2. Start the development server:
    npm start

⚠️ Notes

  • Posts and changes are not persistentβ€”this is a frontend-only demo.
  • Refresh to revert changes.
  • No backend or authentication included.

Feel free to use this project as a starting point for more advanced features or as a demonstration of React 18 capabilities.

About

A React 18 exercise for basic CRUD API functionality. | Sep 2022

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published