DEV Community

Discussion on: Using the Resize Observer API with React

Collapse
bfunc profile image
Pavel Litkin • Edited on

Providing refs as dependencies of useEffect is wrong thing to do, it is supposed to receive values from props/state/props+state computed values only.

Another minor thing: "contentRect" property is currently supported but will be deprecated some day, MDN suggests to use "contentBoxSize".