Skip to content

Repository files navigation

React CRUD App, Vite, Tailwind v4, MockAPI

Overview Build a simple CRUD app with React that talks to a mock API. You can create, read, update, and delete items. Each item has text fields and an image with preview.

Tech stack

  • React 18
  • Vite
  • React Router
  • Axios
  • Tailwind CSS v4

Prerequisites

  • Node 18 or newer.
  • npm 9 or newer.

Getting started

  1. Create the project npx create-vite@latest react-crud -- --template react cd react-crud

  2. Install runtime deps npm i axios react-router-dom

  3. Install Tailwind v4 npm i -D tailwindcss @tailwindcss/postcss

  4. Add PostCSS config Create postcss.config.js with export default { plugins: { '@tailwindcss/postcss': {} } }

  5. Add Tailwind entry Create src/index.css with @import "tailwindcss" @source "../index.html" @source "./**/*.{js,jsx,ts,tsx}"

  6. Import Tailwind CSS In src/main.jsx add import "./index.css"

  7. Run the app npm run dev Open http://localhost:5173

Build and preview

  • Build npm run build
  • Preview the build npm run preview

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages