Skip to content

React 16 support claimed in peerDependencies but @floating-ui/react@^0.27 dependency dropped it #6321

Description

@cascornelissen

react-datepicker@7.6.0 and later (including v8 and v9) depend on @floating-ui/react@^0.27, which explicitly dropped React 16 support in its 0.27.0 release:

breaking: drop React 16 support. 17 is the minimum supported version.

However, react-datepicker continues to declare react@"^16.9.0 || ^17 || ^18 || ^19" in its peerDependencies, claiming React 16 compatibility.

This causes peer dependency warnings on npm install for any project using React 16:

npm warn Could not resolve dependency:
npm warn peer react@">=17.0.0" from @floating-ui/react@0.27.20
npm warn node_modules/react-datepicker/node_modules/@floating-ui/react

The mismatch was introduced in #5268 (dependabot bump of @floating-ui/react from 0.26.27 to 0.27.0, merged Dec 6 2024).

Expected: Either:

  1. Pin @floating-ui/react to ^0.26 to actually support React 16 as declared (this would be great), or
  2. Update peerDependencies to react@">=17" to honestly reflect the minimum supported version

Versions affected: 7.6.0+ (including 8.x and 9.x)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions