Cannot use ref within <Measure>
Closed this issue · 1 comments
estaub commented
Refs worked in V1, but break in V2 with React error:
Stateless function components cannot have refs.
Example:
<Measure bounds onResize={...}>
{() => (
<div ref='outerDiv' className={css(styles.outerDiv)}></div>
)}
</Measure>
souporserious commented
String refs unfortunately don't work with child functions. You can read more about them here. I'll add the same documentation here when I get a chance.