Introduction

Important:

  • This API is only relevant for custom widgets in Branded Apps.
  • Custom widgets are not yet available to all users.
  • This API is in Developer Preview and is subject to change.

The Wix Navigate Mobile API contains functionality for navigating through your mobile app.

To use the Wix Navigate Mobile API, import wixNavigateMobile from wix-navigate-mobile module:

Copy

Stack navigation

Mobile apps built on Wix use stack navigation. Stack navigation means that screens are arranged in a stack, so each new screen is placed on top of the previous screen, much like a stack of cards. App users can navigate back to the previous screen by pressing the back button or by calling closeScreen(). You can think of this action as removing the top screen from the stack.

Did this help?

closeScreen( )


Closes the current screen.

developer preview tag

closeScreen() returns a promise that resolves when the screen closes.

Method Declaration
Copy
function closeScreen(ClosedScreenData: ClosedScreenData): Promise<void>;
Method Parameters
ClosedScreenDataClosedScreenDataRequired

Data to send to the screen beneath this one in the stack. Learn more about stack navigation.

Close a screen
JavaScript
import wixNavigateMobile from "wix-navigate-mobile"; screenData = { data: "This is my screen data.", }; wixNavigateMobile.closeScreen(screenData).then(() => { console.log("Screen closed."); });
Did this help?