Ask questionsBug: React Context API is not working from custom NPM library
I have total of three npm packages:
If I have these components in a single app, everything works as expected. However, if I separate them to their own npm packages, the state is no longer retrievable by the consumer.
React version: 16.13.1
Link to code example: https://github.com/ayayalar/ReactContextAPIDefect
<!-- Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve. -->
The context state is not retrievable by the consumer.
The context state should be retrievable by the consumer.
Answer questions vkurchatkin
If you can't reproduce it using a single a file, it is a problem with your build configuration, not React