Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React redux dependency issue ReactReduxContext Consumer is null #144

Open
skmasq opened this issue May 28, 2020 · 0 comments
Open

React redux dependency issue ReactReduxContext Consumer is null #144

skmasq opened this issue May 28, 2020 · 0 comments

Comments

@skmasq
Copy link

skmasq commented May 28, 2020

I'm using parcel for building my application and I had this issue reduxjs/react-redux#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 skmasq changed the title React redux dependency resolve issue with parcel React redux dependency issue ReactReduxContext Consumer is null May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant