@k8ordo/ui

Resize

Calls onChange when the size of its children changes.

Import

ts
import { Resize } from '@k8ordo/ui';

Usage

onChange is also called once when observation starts. It takes no argument; read what you need from the DOM in the handler.

Basic usage

Notified 0 times
tsx
<Resize onChange={remeasure}>
  <div>…</div>
</Resize>

Props

children
Type: ReactNode
Default: -
onChange
Type: () => void
Default: -
PropTypeDefault
childrenReactNode-
onChange() => void-
k8ordo

React libraries that use Baseline features without holding back.