Documentation

Documentation

Error

Reorder.Group must be provided values

Reorder.Group must be provided values

You've received the following message:

Reorder.Group must be provided a values prop

Reorder.Group must be provided values

You're attempting to render a <Reorder.Group> component without passing a values prop.

<Reorder.Group />

<Reorder.Group> requires a values array.

const [items, setItems] = useState([0, 1, 2])

return (
  <Reorder.Group values={items} onReorder={setItems}>

Each item in the values array must be passed to a Reorder.Item component:

    {items.map((item) => <Reorder.Item key={item} value={item} />)}
  <

This is how Reorder.Group knows which Reorder.Item represents which value.

Motion+

Motion+

Motion+

Level up your animations with Motion+

Unlock the full vault of 290+ Motion examples, premium APIs, private Discord and GitHub, and powerful VS Code animation editing tools.

One-time payment, lifetime updates.