react-modal: Error: Invariant Violation: addComponentAsRefTo

Seeing this error in the latest 0.6.1:

Error: Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded 

Anyone else having this issue?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 1
  • Comments: 15

Most upvoted comments

Yup @antoinerey that worked for me. Closing this issue.

This error with: 15.6.2 -react, 3.1.13 - react- modal

I can, but it will take a while because I would need to pull it into our internal packaging system to be able to use it first, and I’m pretty much done for today as it’s Friday evening.

I can get back to you with an attempt with a newest version on Monday. Thanks for taking a look at this, cheers!