Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: react version and @react/types version are incompatible #29040

Closed
JustinSutu opened this issue May 10, 2024 · 1 comment
Closed

Bug: react version and @react/types version are incompatible #29040

JustinSutu opened this issue May 10, 2024 · 1 comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@JustinSutu
Copy link

JustinSutu commented May 10, 2024

React and @types/react are installed in the project, but the versions do not match. useReducer error in Eslint.

React version: 18.2.0
when I install @types/react with version: 18.2.69, but actual version 16.8.0 in project.

image

Steps To Reproduce

  1. import { useReducer } from 'react'
image
  1. The third parameter of useReducer is required, which does not match the intended use case of the API.
@JustinSutu JustinSutu added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label May 10, 2024
@eps1lon
Copy link
Collaborator

eps1lon commented May 10, 2024

The @version in the JSDoc indicates when this function was added not which version of the types you have.

The third argument is not always required. Only in this overload.

@eps1lon eps1lon closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

2 participants