bjgrosse / react-resize-panel

Simple React resize panel component
MIT License
139 stars 55 forks source link

Error with ref #1

Open Hammond2789 opened 4 years ago

Hammond2789 commented 4 years ago

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
bjgrosse commented 4 years ago

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

Hammond2789 commented 4 years ago

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> 
bjgrosse commented 4 years ago

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