Loading tutorials
useState. It covers how to create a context object. The next chapters cover supplying and reading its value.2 min readuseState. It also assumes you have already called createContext. Here you will supply a value to part of a component tree.2 min readcreateContext, Provider and useContext from the previous chapters. It covers the argument you pass to createContext, which is easy to treat as boilerplate.2 min readuseState hook, and how createContext and Provider work from the previous chapters. Here the focus is the reading side: how a component gets a value out of context and what can go wrong.2 min readProvider, and read the value with useContext. You should also know how a component's props and children work. Here you will see what happens when providers for the same context sit inside each other.2 min readcreateContext, Provider and useContext from the earlier chapters. It also assumes you are comfortable with useState. Here you will make a context carry a value that changes over time.2 min readuseState, and the basics of how React re-renders a component. You should also have seen createContext, a Provider, and useContext. Here you will learn exactly which components re-render when a context value changes, and why.2 min readuseContext. It also assumes you know that a state change re-renders a component and its children, and that you have used useMemo and useCallback at a basic level.2 min readcreateContext, Provider and useContext. It also assumes you have seen useState and why a new object on each render is a new value. Here you package those pieces into a reusable unit.2 min readcreateContext, Providers, useContext, and how to wrap a context in a provider component with a custom hook. It also assumes you know that a context change re-renders every consumer.2 min readcreateContext, Provider and useContext, and that you have seen why a changed context value re-renders every consumer. It also assumes you have used useReducer with context.2 min readcreateContext, Providers, useContext, and how a context value change re-renders its consumers. Context solves prop drilling, but it is often used where something simpler fits better. Here is how to tell.3 min readcreateContext, Provider components and useContext, and that you have React 19 or later installed. The use API does not exist in React 18 and earlier.3 min read