Skip to content

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.

License

Notifications You must be signed in to change notification settings

Espadv69/useContext-Basics

Repository files navigation

useContext-Basics

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.

📁 Projects

  1. ThemeToggle-Context
    Toggle between light and dark mode using ThemeContext.

  2. AuthContextDemo-Context
    Simulated login/logout functionality with AuthContext.

  3. LanguageSelector-Context
    Switch between different languages using LanguageContext.

🚀 Getting Started

Each project is located in its own folder. You can run them individually:

  cd ProjectFolderName
  npm install
  npm run dev

Example:

  cd ThemeToggle-Context
  npm install
  npm run dev

🛠️ Requirements

  • Node.js and npm installed
  • Basic knowledge of React

📚 Topics Covered

  • Creating and using context providers
  • Sharing state across components
  • Managing themes, auth state, and language preferences globally

🤝 Contributing

Feel free to submit issues or pull requests to improve this project.

📄 License

This project is licensed under the MIT License.


Made with ❤️ by Espadv69

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published