Search.../

navigate( )

Navigates the user to another page in the dashboard.

Description

This function can only be used in page code files for dashboard pages created in the Wix Editor or with Wix Blocks.

You can identify the page to navigate to using its page ID. If a destination object with an invalid pageId value is passed to this function, a Page Not Found message is displayed in the dashboard.

Note: Currently, you can only use navigate() to navigate to dashboard pages created in the Wix Dev Center or with the Wix CLI. You can't use it to navigate to pages created with Wix Blocks or to dashboard pages created with the Wix Editor.

Syntax

function navigate(destination: Destination): void

navigate Parameters

NAME
TYPE
DESCRIPTION
destination
Destination

Destination to navigate to.

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

Navigate to the dashboard home page

Copy Code
1import { navigate } from 'wix-dashboard';
2
3// ...
4
5navigate({pageId: '2e96bad1-df32-47b6-942f-e3ecabd74e57'});