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

[Docs - codesandbox] - Suspense Example is broken #3453

Closed
Avivhdr opened this issue Mar 30, 2022 · 4 comments
Closed

[Docs - codesandbox] - Suspense Example is broken #3453

Avivhdr opened this issue Mar 30, 2022 · 4 comments

Comments

@Avivhdr
Copy link

Avivhdr commented Mar 30, 2022

Describe the bug

The Suspense Example Codesandbox in the suspense page of the documentation is not working:

ModuleNotFoundError
Could not find module in path: 'react/jsx-runtime' relative to '/src/components/Spinner.js'

Your minimal, reproducible example

Codesandbox

Steps to reproduce

  1. Go to https://codesandbox.io/s/github/tannerlinsley/react-query/tree/master/examples/suspense?file=/package.json.
  2. See broken sandbox.

Expected behavior

Code should run.

How often does this bug happen?

No response

Screenshots or Videos

No response

Platform

Codesandbox

react-query version

3.5.0

TypeScript version

No response

Additional context

No response

@pkellner
Copy link

Similar issues with vercel swr.

@TkDodo TkDodo closed this as completed Apr 2, 2022
@Avivhdr
Copy link
Author

Avivhdr commented Apr 22, 2022

Hey @TkDodo, the sandbox is still broken fyi.

@TkDodo
Copy link
Collaborator

TkDodo commented Apr 22, 2022

I have fixed the examples for v4, but the docs still pick up the version from master. I've just updated all dependencies, hope that makes it work.

For now, what you can do is:

  • open the sandbox
  • fork it
  • update react from experimental to v18
  • sadly, the api for startTransition has changed, so you need to switch the order of the return values.

Anyways, I've just done that, so here is a working sandbox. Sorry for the troubles:

https://codesandbox.io/s/white-pine-xncu70?file=/src/index.js

@Avivhdr
Copy link
Author

Avivhdr commented Apr 22, 2022

Thank you, Dominik!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants