Skip to content

Commit

Permalink
Remove uneeded skip param
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Dec 15, 2022
1 parent 47ca3bb commit 5f09fb3
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/remix-react/scroll-restoration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import type { ScriptProps } from "./components";
import { useMatches } from "./components";

let STORAGE_KEY = "positions";
let hydrated = false;

/**
* This component will emulate the browser's scroll restoration on location
Expand All @@ -29,7 +28,6 @@ export function ScrollRestoration({
useScrollRestoration({
getKey,
storageKey: STORAGE_KEY,
skip: !hydrated,
});

// In order to support `getKey`, we need to compute a "key" here so we can
Expand Down Expand Up @@ -66,12 +64,6 @@ export function ScrollRestoration({
}
}).toString();

// Use this to skip restoration on the initial load since we'll do it in
// the inline <script> below
if (!hydrated) {
hydrated = true;
}

return (
<script
{...props}
Expand Down

0 comments on commit 5f09fb3

Please sign in to comment.