Skip to content

Commit f84a4a9

Browse files
committed
Add notes & gen code for route settings configurations.
1 parent 996415c commit f84a4a9

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
172 KB
Loading

docs/resources/ui/pages/pages-properties.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,39 @@ customize the URL paths for web and mobile deep linking, set meaningful Page
3333
Names as unique identifiers, integrate dynamic parameters into your routes, and
3434
set access restrictions based on user authentication.
3535

36+
![route-settings-configs.png](imgs/route-settings-configs.png)
37+
38+
**Skip On Page Load When Inactive**
39+
40+
Ensures that actions are bypassed if the Entry Page or Logged In Page is detected as inactive. This is designed specifically for entry points in the app to prevent unnecessary operations when the page is not fully active, optimizing performance and avoiding redundant executions.
41+
42+
:::tip[Generated Code]
43+
When this check is enabled, the following code is added to your `initState` of your page:
44+
```js
45+
if (RootPageContext.isInactiveRootPage(context)) {
46+
return;
47+
}
48+
// On Page Load Actions added after this
49+
```
50+
:::
51+
52+
**Requires Authentication**
53+
54+
When the "Requires Authentication" option is enabled for a page, it ensures that only users who are logged in can access that page. This setting is particularly useful for protecting sensitive or personalized content, as it prevents unauthorized users from viewing or interacting with the page.
55+
56+
:::tip[Generated Code]
57+
When the Route object is created for this Page, setting `requireAuth: true` ensures that only authenticated users can access this page. If "Requires Authentication" is checked, the app will automatically enforce authentication checks before navigating to this page. This is automatically enabled for **Logged In Page**.
58+
59+
```js
60+
FFRoute(
61+
name: 'promotionPage',
62+
path: '/promotionPahe',
63+
requireAuth: true,
64+
builder: (context, params) => PromotionPageWidget(),
65+
)
66+
```
67+
68+
3669
:::info[LEARN MORE]
3770
Learn more about Routing [**here**](../../../ff-concepts/navigation-routing/nav-overview.md).
3871
:::

0 commit comments

Comments
 (0)