Skip to content

Hollyw00d/react-todo-app-built-from-scratch-using-webpack-eslint-prettier

Repository files navigation

React Todo App Built from Scratch using Functional Components, webpack, ESLint, and Prettier

This React app was built from scratch and uses functional components, webpack, ESLint, and Prettier to shows a simple todo list and the json-server npm package to create a fake REST API that has full CRUD operations: Screenshot of React Todo App

How to Use

  • In the root of this repo run in your terminal run:
    npm i

Start App

  • Then in the same directory do: npm start
  • Open up another terminal window or tab and to start the server that runs the JSON endpoint and shows npm run server and you should be able to view http://localhost:3000/todos on your browser that shows a JSON endpoint of todos like below: Screenshot of Todos JSON endpoint
  • If you open the Localhost URL that uses the default Vite port and shows the React Todo App (like http://localhost:5173/) you should see something like the screenshot below: Screenshot of React Todo App
  • If you complete any of the actions below on http://localhost:5173/ then the db.json file will also get updated:
    • Add new todo item (enter text in input#new-todo element and then click "Add Todo" button)
    • Click on the "Mark Done", "Edit", or "Delete" buttons
  • If you click on the "All", "Active", or "Completed" buttons the list of todo items will change on the frontend but the db.json file will not get updated (screenshot below when "Completed" button was clicked): Screenshot of React Todo App with completed todos

Build and Open Built App

  • In another terminal tab do: npm run build
  • Then to open the built dist/index.html file that uses the built JavaScript in the terminal do: npm run buildopen
  • You will now see a screenshot like below: Screenshot of React Todo App after running 'npm run build' and then 'npm run buildopen'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published