4.6. Admin Development Constraints
This chapter lists some constraints of admin widgets and UI routes.
Arrow Functions#
Widget and UI route components must be created as arrow functions.
12function ProductWidget() {3 4}5
67const ProductWidget = () => {8 9}
A widget zone's value must be wrapped in double or single quotes. It can't be a template literal or a variable.
12export const config = defineWidgetConfig({3 zone: `product.details.before`,4})5
67const ZONE = "product.details.after"8export const config = defineWidgetConfig({9 zone: ZONE,10})11
1213export const config = defineWidgetConfig({14 zone: "product.details.before",15})
Was this chapter helpful?