JedWatson / JedWatson/react-select

Error @types/react"' has no exported member 'RefCallback'. Did you mean 'useCallback'?

Open
#5,217 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue/bug-unconfirmed
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

I'm use "react-select": "^5.3.2" and "@types/react": "^16.9.2"

I'm received error as below:

client:212 [at-loader] ./node_modules/react-select/dist/declarations/src/components/Option.d.ts:2:21
TS2724: Module '"../../../../../@types/react"' has no exported member 'RefCallback'. Did you mean 'useCallback'?

client:212 [at-loader] ./node_modules/react-select/dist/declarations/src/components/Menu.d.ts:2:32
TS2724: Module '"../../../../../@types/react"' has no exported member 'RefCallback'. Did you mean 'useCallback'?

client:212 [at-loader] ./node_modules/react-select/dist/declarations/src/Select.d.ts:2:126
TS2724: Module '"../../../../@types/react"' has no exported member 'RefCallback'. Did you mean 'useCallback'?

Please help me!
Thank you so much!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported react-select declaration files: components/Option.d.ts, components/Menu.d.ts, and Select.d.ts, and reproduce the error using react-select 5.3.2 with @types/react 16.9.2. Check the referenced React type compatibility; done means the declarations type-check without the missing RefCallback error.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.