useContext-Basics is a collection of three simple React projects that demonstrate how to use the useContext
hook for global state management. Each mini-project focuses on a different real-world scenario: theme toggling, user authentication, and language selection.
-
ThemeToggle-Context
Toggle between light and dark mode usingThemeContext
. -
AuthContextDemo-Context
Simulated login/logout functionality withAuthContext
. -
LanguageSelector-Context
Switch between different languages usingLanguageContext
.
Each project is located in its own folder. You can run them individually:
cd ProjectFolderName
npm install
npm run dev
cd ThemeToggle-Context
npm install
npm run dev
- Node.js and npm installed
- Basic knowledge of React
- Creating and using context providers
- Sharing state across components
- Managing themes, auth state, and language preferences globally
Feel free to submit issues or pull requests to improve this project.
This project is licensed under the MIT License.
Made with ❤️ by Espadv69