`useEffect` is run every time if there is an `options` object.
RunDevelopment opened this issue · comments
Michael Schmidt commented
According to the examples in the docs, useDevicePixelRatio
is supposed to be used with inline option objects.
Example:
const dpr = useDevicePixelRatio({maxDpr: 50})
However, this will cause the internal useEffect
to run every time useDevicePixelRatio
is called, so the deps array of useEffect
is effectively useless (if an inline options object is used).
Espen Hovlandsdal commented
Fixed in 1.1.2 - thanks for reporting!