redux-dynamic-modules icon indicating copy to clipboard operation
redux-dynamic-modules copied to clipboard

React redux dependency issue ReactReduxContext Consumer is null

Open skmasq opened this issue 4 years ago • 0 comments

I'm using parcel for building my application and I had this issue https://github.com/reduxjs/react-redux/issues/1489, in short, the application has react-redux/lib and react-redux/es running at the same time, and my ReactReduxContext was returning null value, because I was accessing the wrong import.

Issue was solved in my application by adding following alias to my module-resolver forcing all imports resolve to

"babel": {
		"plugins": [
			[
				"module-resolver",
				{
					"alias": {
						"react-redux": "react-redux/lib"
					}
				}
			]
		]
	},

I ran into the same issue with this library and I fixed it by manually changing the require("react-redux") to require("react-redux/lib"). Do you have any suggestion how to best go about fixing this issue without manual file editing?

skmasq avatar May 28 '20 08:05 skmasq