-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
What is the current behavior?
Throw error when working with webpack and awesome-typescript-loader
Uncaught TypeError: Cannot read property 'createContext' of undefined
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to a CodeSandbox (https://codesandbox.io/s/new) or RN Snack (https://snack.expo.io/) example below:
I have created a repo to repro this bug: https://github.com/xcatliu/react-redux-bug
Run npm i && npm start && open public/index.html
to see the error
Also, the current work around is to use react-redux/lib
rather than react-redux
What is the expected behavior?
Not throw error
Which versions of React, ReactDOM/React Native, Redux, and React Redux are you using? Which browser and OS are affected by this issue? Did this work in previous versions of React Redux?
react 16.8.6
react-dom 16.8.6
react-redux 7.0.1
redux 4.0.1
redux-devtools-extension 2.13.8
redux-thunk 2.3.0
awesome-typescript-loader 5.2.1
typescript 3.4.3
webpack 4.29.6
webpack-cli 3.3.0