Skip to content

Passing a key to renderThumb causes an error #205

Description

@nwatab

Each child in a list should have a unique "key" prop.
Check the render method of Range. See https://react.dev/link/warning-keys for more information.

  // @ts-expect-error props should have a key
  renderThumb={({key, ...props }) => (
    <div
      key={key}
      {...props}
      style={{
        // ...props.style,
        height: '16px',
        width: '16px',
        borderRadius: '50%',
        backgroundColor: '#FFF',
        border: '2px solid #548BF4',
      }}
    />
  )}

versions:
"next": "15.1.7",
"react-range": "1.10.0"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions