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

experiment with suspending page on client side navigation? #22

Closed
hi-ogawa opened this issue Jun 26, 2023 · 1 comment
Closed

experiment with suspending page on client side navigation? #22

hi-ogawa opened this issue Jun 26, 2023 · 1 comment

Comments

@hi-ogawa
Copy link
Owner

hi-ogawa commented Jun 26, 2023

test("client-side-bad", async ({ page }) => {
await page.goto("/server-redirect");
await isPageReady(page);
await page.getByRole("link", { name: "forbidden link" }).click();
// TODO: if we suspend the query, will react-router doesn't update url until resolution?
await page.waitForURL("/server-redirect/forbidden");
await page.getByText("something went wrong...").click();
await page.waitForURL("/server-redirect?error=client");
});


Q. react-router doesn't provide useTransition/isPending state yet?

@hi-ogawa
Copy link
Owner Author

hi-ogawa commented Jul 1, 2023

It's possible to play around with it but its UX/DX improvement is worth the effort, so it's no-go for now.
See experiments (including patching react-router) in

@hi-ogawa hi-ogawa closed this as completed Jul 1, 2023
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