callbackRef
return value
anymore.null
or undefined as the
ref, or if neither the default ref or RefCallback returned from the hook are
in use, then no ResizeObserver instance will get created until there's an
actual element to observe. Resolves: #42callbackRef
, which can be used in place of the usual
ref
. Use this instead of a normal ref, when the observed component is
mounted with a delay. Resolves: #43, #45ref
option now accepts raw elements as well.useResolvedElement
hook), to handle more edge cases with the way refs are handled.defaultWidth
, defaultHeight
,
useDefaults
.undefined
instead of 1
.onResize
handler that can report size changes instead of the default
object return. (This also helps implementing a more performant throttle /
debounce solution.)#14
Removed the polyfill from the default builds, and shipping
it instead as as separate module.#21
Returning an object instead of an array, so that values not
needed could be omitted.#18
Added missing copyright notice in the MIT license.#16
You can now pass in your own ref.current
value of an Element
will
be ignored.)useDefaults
option.package.json
scripts to ease development