Gets the widget's properties.
The getProps()
function returns a Promise that resolves to an object with all of the widget's properties. To use this function on an inner (nested) widget, use getNestedWidget()
.
Note:
The getProps()
function doesn't work in preview mode.
function getProps(): Promise<object>;
import wixWidget from "wix-widget";
// ...
wixWidget.getProps().then((props) => {
// Code to execute with the props object
});
// Props object can be, for example: {country: "us", upperLimit: 7}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.