Skip to content

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

Closed

Description

@Avivhdr

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

Activity

  1. pkellner commented on Mar 31, 2022

    @pkellner

    Similar issues with vercel swr.

  2. Avivhdr commented on Apr 22, 2022

    @Avivhdr
    Author

    Hey @TkDodo, the sandbox is still broken fyi.

  3. TkDodo commented on Apr 22, 2022

    @TkDodo
    Collaborator

    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

  4. Avivhdr commented on Apr 22, 2022

    @Avivhdr
    Author

    Thank you, Dominik!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions