@solid-primitives/keyed - npm explorer}>
{(value, index) =>
{value}
}

`

Causes the children to rerender when the on key changes. Equivalent of v-key in vue, and {#key} in svelte.

> Note: Since Solid 1.5.0 the component has a keyed prop that works very similarly to .

$3

`ts
import { Rerun } from "@solid-primitives/keyed";
`

$3

You have to provide a on prop. Changing it, will cause the children to rerender.

`tsx
const [count, setCount] = createSignal(0);

// will rerender whole
;

// or pass a function
count()}/>

// or an array of dependencies

`

#### Passing a function as children

You can treat on prop like sources argument of the Solid's on helper, and the children as the second, callback argument.

`tsx

{([count, className]) => (

)}

`

#### Using with Transition

can be used together with solid-transition-group to animate single component's transition, on state change.

`tsx





``

$3

https://codesandbox.io/s/solid-primitives-keyed-rerun-demo-14vjr?file=/index.tsx

Changelog

See CHANGELOG.md