The translation was generated automatically and may contain mistakes
HistoryManager
Object HistoryManager is used to gain access to the transition history and to the current position in that history.
To obtain an object HistoryManager Call the function useHistoryManager() .
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>
);
}Properties
The object contains no properties.
Methods
Method | Description |
|---|---|
Returns the current position in the history stack. | |
Returns the history stack. |
Materials on the topic
- •
- •
- •
- •