Skip to content

To display all hotels fetched from the backend and enable users to delete any hotel directly from the frontend using integrated APIs.

Notifications You must be signed in to change notification settings

Sourabhpande532/HotelFormFlow-Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧾 PRD: Fetch & Delete Hotels via Frontend

🎯 Objective

To display all hotels fetched from the backend and enable users to delete any hotel directly from the frontend using integrated APIs.

⚙️ Scope

Use a custom React hook useFetch.jsx to fetch hotel data from /api/hotels. Each displayed hotel will include a Delete button that sends a DELETE request to /api/hotels/:id, removing the hotel from the database and updating the UI list.

🧩 Features

  • Fetch and render all hotels dynamically using reusable hook.
  • Delete selected hotel and refresh the hotel list instantly.
  • Show success message upon successful deletion.
  • Handle loading and error states gracefully.

🌱 Key Learnings

  • Implementation of DELETE method integration with backend APIs.
  • Efficient state update post-deletion in React.
  • Improved understanding of frontend-backend CRUD synchronization.

Backend

Connect


About

To display all hotels fetched from the backend and enable users to delete any hotel directly from the frontend using integrated APIs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published