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

_processChildContext is not available in React 16+ #1868

Closed
mech opened this issue Sep 20, 2017 · 11 comments
Closed

_processChildContext is not available in React 16+ #1868

mech opened this issue Sep 20, 2017 · 11 comments

Comments

@mech
Copy link

mech commented Sep 20, 2017

Is the release candidate version of React 16 support on v3.3.0-alpha.0? Using React 16.0.0-rc.3, I am getting this react-modal error:

_processChildContext is not available in React 16+.

This likely means you have multiple copies of React and are
attempting to nest a React 15 tree inside a React 16 tree using
unstable_renderSubtreeIntoContainer, which isn't supported.

Try to make sure you have only one copy of React
(and ideally, switch to ReactDOM.createPortal).
@danielduan
Copy link
Member

There shouldn't be anything preventing React 16 from working. I wonder if you have 2 different versions of react installed?

@mech
Copy link
Author

mech commented Sep 21, 2017

I just perform a new app using the following and got the same error. I suspect is react-modal.

▶ create-react-app demo-app
▶ yarn add react@next react-dom@next
▶ getstorybook
▶ yarn run storybook

Visit the browser console give me these:

react-modal-error

@Hypnosphi
Copy link
Member

@mech that's weird, I followed the reproduction instructions and I don't get those errors even after opening some modals. Can you please upload the project you get to GitHub as a repo?

@mech
Copy link
Author

mech commented Sep 23, 2017

You are right, I go to my 2nd laptop and try to use React 16.0.0-rc.3 with create-react-app and it worked fine. Sorry for that, I am surprised my main machine got issues.

@mech mech closed this as completed Sep 23, 2017
@brycehill
Copy link

Hmm, I'm running into this too. Not sure why yet.

@mech
Copy link
Author

mech commented Sep 27, 2017

Try making sure your yarn or NPM is latest version. When I upgrade my yarn from 0.x to 1.x, it works.

@dumbNickname
Copy link
Contributor

In my case rebuilding the lock file from scratch helped - I removed node_modules together with yarn.lock file and re-installed all of the dependencies. Maybe it helps somebody.

@faherrera
Copy link

I have the same problem when I want to use to Modals from 'react-materialize'. And this project have all update. I really need this component. If you can help me, I will be thank

@ArturKwiatkowski
Copy link

Guys I had this issue and it's gone now after I upgraded my yarn to 1.1.0

marielaures added a commit to algolia/react-instantsearch that referenced this issue Oct 12, 2017
@bringking
Copy link

@Fowowski's fix worked for us!

@enejka
Copy link

enejka commented Feb 8, 2018

I had the same issue. It was caused by react-modal ( used by storybook). React-modal installed its own old version of react. Removing node_modules direcory from react-modal package solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants