JedWatson / JedWatson/react-select

Controlled Components - Cannot Resolve Dependency

Open
#5,711 0 comments 0 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

Hello,

I was looking at the examples in the documentation under advanced and couldn't get the CodeSandbox to load without error for controlled props (only one I am having an issue with so far).

To fix this I had to add 'react-syntax-highlighter' to dependencies, update the imports, and the registration of language.

Example in Question:
image

Error seen when clicking on the CodeSandbox to load:
image

With fix applied:
image

I would submit a pull request, but I can't seem to find a way to edit the Code Sandboxes.

Thank you!

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 Advanced documentation example for controlled props and open its linked CodeSandbox configuration. Check how react-syntax-highlighter is listed, imported, and registered for the language; done means the sandbox loads without the reported dependency error and the example still renders correctly.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.