# Function UNSAFE_useScrollRestoration

- UNSAFE_useScrollRestoration(__namedParameters?): void

- When rendered inside a RouterProvider, will restore scroll positions on navigations

  #### Parameters

  - `Optional` __namedParameters: {
    getKey?: GetScrollRestorationKeyFunction;
    storageKey?: string;
    }

    - ##### `Optional` getKey?: GetScrollRestorationKeyFunction

    - ##### `Optional` storageKey?: string

  #### Returns void

  - Defined in common/temp/node_modules/.pnpm/react-router-dom@6.23.1_react-dom@18.3.1+react@18.3.1/node_modules/react-router-dom/dist/index.d.ts:279