See it in action at https://codesandbox.io/s/n6txl.
Have you ever come across a tree like this:
<ContextA.Provider>
<ContextB.Provider>
<ContextC.Provider>
...
</ContextC.Provider>
</ContextB.Provider>
</ContextA.Provider>
Instead, we can compose/combine this list of providers:
<Compose items={[
[ContextA, props],
[ContextB, props],
[ContextC, props],
]}>
...
</Compose>
thanks!!!, it was helpful to me, I'm using jest to test, now with this gist I can compose different wrapper depending of the test 👏 👏 👏