Skip to main content

Adding New Page

All pages will be available in the default theme. You can add new pages or override existing pages by following the steps below.

Add or replace a page

Current working directory is packages/<package-id>

1. Create a new page

Create a new react native component in folder pages folder. You can use pages/customPage.js as a reference.

const pageData = {
title: "Custom Page",
blocks: [
{
name: "namespace/custom-block",
attributes: {
title: "Title from app",
},
},
],
};

2. Register the newly created page

Register this page to appmaker pages registry in pages/index.js file.

import CustomPage from "./customPage";

const pages = {
"custom-page": CustomPage,
};
export { pages };

Main pages