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

Doc's Demo that includes const theme = use(ThemeContext) is broken #27678

Closed
pkellner opened this issue Nov 9, 2023 · 4 comments
Closed

Doc's Demo that includes const theme = use(ThemeContext) is broken #27678

pkellner opened this issue Nov 9, 2023 · 4 comments
Labels
Resolution: Stale Automatically closed due to inactivity Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@pkellner
Copy link

pkellner commented Nov 9, 2023

On your docs page, https://react.dev/reference/react/use#usage the first demo that includes useContext is broken. It does not work on the page itself, and it does not work when you run it with the associated codesandbox.

I tried it on both firefox and chrome on a mac.

It do see this error, though not sure it is related.

uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'

@pkellner pkellner added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Nov 9, 2023
@LucaDillenburg
Copy link

Hi @pkellner . Hope this finds you well.
Can you confirm you are using React’s canary or a experimental channel?
According to the documentation, "The use Hook is currently only available in React’s canary and experimental channels."

@pkellner
Copy link
Author

There are really two things here.

Running the example in the code preview window in the doc's itself doesn't work (I don't know what version that is, but I assume it is the same as the codesandbox project it references), and...

When I download the code in that codesandbox, the version of React is specified exactly in that.

Here is that package.json

image

Copy link

github-actions bot commented Apr 5, 2024

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Apr 5, 2024
Copy link

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Stale Automatically closed due to inactivity 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