Accepted answer

I heard from a clever friend of mine that the problem is because React contexts are defined at the module-level, and so since you tried to have your contexts in separate entrypoints, things will not go so well.

I think you can try making an index.js file that re-imports and exports everything, and then things should work as it's all consolidated in one module.

Related Query

More Query from same tag