react-resize-panel icon indicating copy to clipboard operation
react-resize-panel copied to clipboard

Error with ref

Open Hammond2789 opened this issue 5 years ago • 3 comments

Uncaught Invariant Violation: Element ref was specified as a string (wrapper) but no owner was set. This could happen for one of the following reasons:

  1. You may be adding a ref to a function component
  2. You may be adding a ref to a component that was not created inside a component's render method
  3. You have multiple copies of React loaded

I used the example from the demo.

import ResizePanel from "react-resize-panel";

left panel

Hammond2789 avatar Dec 06 '19 10:12 Hammond2789

Hi Hammond, can you give the steps to reproduce the error?

bjgrosse avatar Dec 06 '19 11:12 bjgrosse

Ah I did but the site has added it as actual HTML. I just copy and pasted from the demo.

<ResizePanel direction="e">
    <div className="panel sidebar">left panel</div>
</ResizePanel> 

Hammond2789 avatar Dec 06 '19 11:12 Hammond2789

Can you paste the code for the entire component so I can reproduce here?

bjgrosse avatar Dec 06 '19 12:12 bjgrosse