Taskify is a simple todo list application built with React using Vite.
- Add new tasks
- Edit existing tasks
- Delete tasks
- Sort tasks by name or reverse alphabetical order
- Accessibility options for dyslexic and colorblind users
- Clone this repository to your local machine.
- Install the required dependencies using
npm install
. - Start the development server using
npm run dev
. - Open your web browser and navigate to
http://localhost:3000
.
react
andreact-dom
: Required for building React components and rendering them in the browser.react-scripts
: A set of scripts for building and testing React apps.
The app uses the useState
hook to manage the following state variables:
todos
: An array of todo objects, each with atask
andcompleted
property.input
: The value of the input field used for adding new todos.editTodoIndex
: The index of the todo being edited.editTodoValue
: The value of the input field used for editing a todo.sortBy
: The current sort method ("name" or "reverse").dyslexicMode
: Whether dyslexic mode is enabled or not.colorblindMode
: Whether colorblind mode is enabled or not.
The app uses the following functions:
addTodo
: Adds a new todo to thetodos
array.deleteTodo
: Removes a todo from thetodos
array.saveEditTodo
: Saves the edited todo to thetodos
array.cancelEditTodo
: Cancels the editing of a todo.sortByKey
: Sorts thetodos
array based on the selected sort method.dyslexia
: Toggles dyslexic mode.colorblind
: Toggles colorblind mode.
The app uses the useEffect
hook to manage the following side effects:
- Saving and retrieving the
todos
,dyslexicMode
, andcolorblindMode
state variables to and fromlocalStorage
. - Setting the initial values of the
todos
,dyslexicMode
, andcolorblindMode
state variables based on their saved values inlocalStorage
.