You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/components/link.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -56,12 +56,12 @@ A relative `<Link to>` value (that does not begin with `/`) resolves relative to
56
56
57
57
[link-native]: ./link-native
58
58
59
-
## `resetScroll`
59
+
## `preventScrollReset`
60
60
61
61
If you are using [`<ScrollRestoration>`][scrollrestoration], this lets you prevent the scroll position from being reset to the top of the window when the link is clicked.
62
62
63
63
```tsx
64
-
<Linkto="?tab=one"resetScroll={false} />
64
+
<Linkto="?tab=one"preventScrollReset={true} />
65
65
```
66
66
67
67
This does not prevent the scroll position from being restored when the user comes back to the location with the back/forward buttons, it just prevents the reset when the user clicks the link.
Copy file name to clipboardExpand all lines: docs/components/scroll-restoration.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -96,10 +96,10 @@ Or you may want to only use the pathname for some paths, and use the normal beha
96
96
When navigation creates new scroll keys, the scroll position is reset to the top of the page. You can prevent the "scroll to top" behavior from your links:
97
97
98
98
```tsx
99
-
<LinkresetScroll={false} />
99
+
<LinkpreventScrollReset={true} />
100
100
```
101
101
102
-
See also: [`<Link resetScroll>`][resetscroll]
102
+
See also: [`<Link preventScrollReset>`][preventscrollreset]
103
103
104
104
## Scroll Flashing
105
105
@@ -108,4 +108,4 @@ Without a server side rendering framework like [Remix][remix], you may experienc
108
108
Server Rendering frameworks can prevent scroll flashing because they can send a fully formed document on the initial load, so scroll can be restored when the page first renders.
0 commit comments