Skip to content

SlotHTMLAttributes breaks compatibility with React 16 / 17 (missing peerDependency for React 18) #906

@RadekJakGit

Description

@RadekJakGit

Initial checklist

Affected package

6.0.0

Steps to reproduce

Version 6.0.0 requires react 18.

Actual behavior

In [email protected], the TypeScript definitions use React.SlotHTMLAttributes, which is only available in @types/[email protected]+. This causes compilation errors in projects using React 16 or 17, such as:
error TS2724: 'React' has no exported member named 'SlotHTMLAttributes'.

This makes it impossible to use this package with React 16 or 17 without type errors, even though the package technically installs fine due to missing peer dependency checks.

Expected behavior

To improve developer experience and avoid silent breakage, please consider adding:

"peerDependencies": {
  "react": "^18.0.0",
  "react-dom": "^18.0.0"
}


### Runtime

_No response_

### Package manager

_No response_

### Operating system

_No response_

### Build and bundle tools

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    🤞 phase/openPost is being triaged manually

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions