Important:
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:
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.
Closes the current screen.
closeScreen()
returns a promise that resolves when the screen closes.
function closeScreen(ClosedScreenData: ClosedScreenData): Promise<void>;
Data to send to the screen beneath this one in the stack. Learn more about stack navigation.
import wixNavigateMobile from "wix-navigate-mobile";
screenData = {
data: "This is my screen data.",
};
wixNavigateMobile.closeScreen(screenData).then(() => {
console.log("Screen closed.");
});