Ayush KumarforNamaste React - Blognamaste-react.hashnode.dev·14 hours agouseContext() - React Hooks1. Set Up the Context create a file called ThemeContext.js and add the below code // 📂 context/ThemeContext.js import React, { useState, createContext } from "react"; // Create context object // export const ThemeContext = React.createContext(); ex...Discuss·1 likeReact
Animesh Kumaranimeshk.hashnode.dev·Jul 7, 2024Understanding React HooksReact Hooks are a powerful feature that allows you to use state and other React features without writing a class. Introduced in React 16.8, hooks have changed how we write React applications by making code simpler and more readable. In this blog, we ...Discuss·10 likesReact
Jacob Gonzalesbabygonzo.hashnode.dev·Jul 1, 2024Simplifying State Management in React with "useContext"In a React application, passing data from parent components to child components using props is a common practice. However, as your application grows, managing state and passing props through multiple layers of components can become cumbersome and err...DiscussGeneral Programming
Mohsin Khansabmohsinkhansab.hashnode.dev·Jun 29, 2024Key React Hooks Explained: useState, useEffect, and useContextuseState() The purpose of useState is to handle reactive data. Any data that changes in the application is called state. When the state changes you want react to update the UI, so the latest changes are reflected to the end user. How to use it? const...Discuss·28 readsReact
Tito Adeoyetitoadeoye.hashnode.dev·Jun 17, 2024React Hooks: useContextHello again👋 React hooks have revolutionized how developers manage state and side effects in functional components. If you’re already familiar with useState for handling local component state, you’re off to a great start (If not, please check this o...DiscussReact Hooks Unboxed 📦: A Beginner's Adventure 🚀React
Moniquectrlaltmonique.hashnode.dev·Jun 7, 2024Type-Safe State Management with React's Built In HooksOccasionally, resorting to an external state manager in our React projects might feel like bringing a bazooka to a knife fight—effective, but perhaps a bit excessive. Often, what we truly seek is a means to store our global state outside individual c...DiscussuseContext
Aryan kadamaryankadam.hashnode.dev·Apr 19, 2024React JS Beginner to Advanced series (4)Before diving into this blog, make sure you've checked out the previous blogs in this series on my profile: ReactJS Beginner to Advanced Series These blogs will provide you with essential knowledge and context for understanding the concepts discussed...Discuss·32 readsReact
Velia Preciousveekeme.hashnode.dev·Mar 31, 2024FeaturedUnderstanding State Management in React: useState and useContextHave you ever marveled at how clicking a button on a website magically increments a counter or changes the button's color? That's the magic of state at play. In this article, we will explore the exciting world of state management in React. Whether yo...Discuss·30 likes·469 readswriting
Abhrajit Guptaabhrajitgupta.hashnode.dev·Mar 30, 2024Miscellaneous HooksIn this article, we'll explore three hooks: useContext, useMemo, and useCallback, along with simple examples demonstrating their usage. useContext hook: The useContext hook allows components to consume values from the React context without having to ...Discuss·16 likes·53 readsuseCallback
Ayush Kumarkrayush1109.hashnode.dev·Mar 28, 202416 useContext() - State Management - NextjsTopic 16: Context API Topic 17: Redux StateManagement Topic 18: Redux Toolkit and Immer 1. Introduction to State Management: Understanding State in React: State refers to data that can change over time within a component. Components can have lo...DiscussReact JSReact state management