4

Trying to set ref to use it in component method, but it's not defined. If I move ref definition outside AutoSizer, then it works without issues.

           <div ref='refOK'>
                       this ref CAN be access in component's method
                   </div>
            <AutoSizer>
                {({ height, width }) =>
                   <div ref='refNotOK'>
                       this ref CANNOTbe access in component's method
                   </div>
                }
            </AutoSizer>
Anton
  • 1,898
  • 3
  • 18
  • 27

0 Answers0