Isolating Implementation Details
In this lesson, we'll centralize the implementation for the user state and provider in one place.
We'll cover the following...
The solution highlighted in the previous lesson works but not without some caveats.
A better solution will be to centralize the logic for the user state and Provider
in one place. This is a pretty common practice. Let me show you what I mean.
UserContext.js
Instead of having the Root
component manage the state for ...