Joel.Watson92@gmail.com | LinkedIn: /in/joel3rbear | Twitter: @Joel3rBear
The difference between the MyContext variable and the MyProvider variable from the example is that the MyContext variable is just a reference to a new react context that was created. The MyProvider variable is an actual component that uses the context to defined/modified state variables.
Context is useful because it allows us to pass state variables directly to the component that needs them without having to pass it to each component as a prop.
Components outside the provider will not have access to the same context that is accessible inside the provider.