The translation was generated automatically and may contain mistakes
useHistoryManager
Use this function to get the object HistoryManager which is used to access the navigation history in the application.
Example
TypeScript
import { useHistoryManager, useRouteNavigator } from '@vkontakte/vk-mini-apps-router';
export function SomePage() {
const historyManager = useHistoryManager();
const routeNavigator = useRouteNavigator();
const currentPosition = historyManager.getCurrentPosition();
return (
<Button onClick={() => routeNavigator.go(-currentPosition)}>
На первую страницу в стеке
</Button>
);
}Parameters
Not used.
Announcement
TypeScript
export function useHistoryManager(): HistoryManagerResult
Object HistoryManager .
Materials on the topic
- •
- •
- •