Skip to main content
App Extensions customize specific parts of the mobile application with JavaScript. You write the logic, and Expresso runs it when the mobile application reaches that point.

How App Extensions work

Each App Extension is an entry in the extensions list of napps.config.json:
  • renderer sets the extension type.
  • functionName is the name of the export that Expresso runs for the extension.
Your project entry file, index.ts, must export a function with that name. You can choose any name, as long as the export and functionName match. If they don’t, Expresso cannot run the extension. The easiest way to add an extension is napps create-extension:
The command creates src/DiscountTags.extension.ts with a default export, re-exports it from index.ts, and adds the entry to napps.config.json:
Run napps create-extension without options to pick the type from a list.

Available App Extensions

Each extension has its own contract, inputs, and outputs, documented on its page: The renderer values are spelled exactly as the Napps CLI expects them, including product-formater. For a minimal implementation of each one, see App Extensions examples.