(Created by Fabricio Braga, last update Feb 19th 2025)
A simple task management application built with React, Redux, and modern React Hooks (useState
, useEffect
). This project is designed to help students learn core React concepts, state management with Redux, and event handling.
- Add a new task.
- Delete a task.
- Mark a task as completed.
- View a list of all tasks.
- React
- Redux (for state management)
- React Hooks (
useState
,useEffect
) - HTML/CSS (for styling)
Before running the project, ensure you have the following tools installed:
Node.js is a JavaScript runtime, and npm (Node Package Manager) is used to manage dependencies.
- Install Node.js and npm:
- Download and install Node.js from https://nodejs.org/.
- Verify the installation:
node -v npm -v
nvm
is a tool to manage multiple Node.js versions on your machine. It's useful if you work on multiple projects with different Node.js versions.
-
Install nvm:
- For macOS/Linux:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
- For Windows: Download the installer from https://github.com/coreybutler/nvm-windows.
- For macOS/Linux:
-
Verify nvm installation:
nvm --version
-
Install a specific Node.js version:
nvm install 18 nvm use 18
Follow these steps to set up and run the project locally.
Clone the repository to your local machine:
git clone https://github.com/hackthegap/react-task-manager.git
cd react-task-manager
Install the required dependencies using npm:
npm install
Start the development server:
npm start
The application will open automatically in your default browser at http://localhost:3000.
Here’s an overview of the project structure:
react-task-manager/
├── src/
│ ├── app/ # Redux store configuration
│ ├── features/ # Redux slices (e.g., tasksSlice.js)
│ ├── components/ # React components (e.g., TaskForm, TaskList)
│ ├── App.js # Main application component
│ ├── index.js # Entry point for the app
│ └── App.css # Styles for the app
├── public/ # Static assets (e.g., index.html)
├── package.json # Project dependencies and scripts
└── README.md # Project documentation
In the project directory, you can run the following scripts:
npm start
: Runs the app in development mode.npm test
: Launches the test runner.npm run build
: Builds the app for production.npm run eject
: Ejects the app from Create React App (advanced use only).
This project covers the following key concepts:
- React Components: Breaking the UI into reusable components.
- State Management: Using Redux to manage global state.
- React Hooks: Using
useState
anduseEffect
for local state and side effects. - Event Handling: Handling user interactions like adding and deleting tasks.
- Styling: Basic CSS for styling the application.
If you'd like to contribute to this project, follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeatureName
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/YourFeatureName
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- This project was created as part of a course to teach React and Redux concepts.
- Special thanks to Create React App for the project setup.
If you have any questions or need further assistance, feel free to reach out to the instructor or open an issue in the repository.
This README
file provides a comprehensive guide for students to set up the project, understand its structure, and learn the key concepts. Let me know if you'd like to add or modify anything!