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

throw dataWith... is not working with React Router 7 #38

Open
jhiven opened this issue Mar 16, 2025 · 0 comments
Open

throw dataWith... is not working with React Router 7 #38

jhiven opened this issue Mar 16, 2025 · 0 comments

Comments

@jhiven
Copy link

jhiven commented Mar 16, 2025

throw dataWithToast() and throw await dataWithToast() is not working with React Router 7. I have tested it using a fresh new project template from React Router.

Steps to reproduce:

  • create a React Router 7 project with Framework Mode from the official docs.
  • install remix-toast
  • follow the usage guide from this repository (i use sonner)
  • just call throw dataWithToast() or throw await dataWithSuccess() in any loader.

Observed Behaviour:

throw dataWithToast() give this output in log:

Promise {
  DataWithResponseInit {
    type: 'DataWithResponseInit',
    data: null,
    init: {
      headers: Headers {
        'Set-Cookie': 'toast-session=...; Path=/; HttpOnly; SameSite=Lax'
      }
    }
  },
  [Symbol(async_id_symbol)]: 30172,
  [Symbol(trigger_async_id_symbol)]: 30125,
  [Symbol(kResourceStore)]: undefined
}

whereas throw await dataWithToast() didn't log anything

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

1 participant