Skip to content
Discussion options

You must be logged in to vote

It's these lines in the <ScrollRestoration/> component that makes it not work.

// don't do anything on submissions
if (wasSubmissionRef.current === true) {
wasSubmissionRef.current = false;
return;
}

I imagine it's there so when you're doing submit using useFetcher you typically don't want the page to scroll. However, this does break full page submits.

For now, I simply copied the code into my project and removed those lines.

NOTE: I would not use reloadDocument unless absolutely necessary, as this causes a full page load (downloads HTML, CSS, JavaScript, etc.) instead of ju…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@Maks19
Comment options

Answer selected by Maks19
Comment options

You must be logged in to vote
2 replies
@kiliman
Comment options

@Maks19
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants