Epic React V2

Split Context

(See readme.mdx)

The footer setters are re-rendering when we make a change, even to the context value. Nothing in the footer setter that depends on the color or name values.

Instead of having a single value, you actually have two values, one for the setters and one for the state. And then you have two separate contexts, one context for the state, one context for the setters. That is the idea behind splitting context. Only need if you have two much things going on in your context value.

Set the footer color:

Set the footer name:

I am the (black) footer, Unnamed