Skip to content

Commit edf5050

Browse files
authored
Merge branch 'main' into pooja/home-page-revamp
2 parents cc036e5 + 8d22c4b commit edf5050

File tree

5 files changed

+22
-1
lines changed

5 files changed

+22
-1
lines changed
Binary file not shown.

docs/ff-concepts/state-management/state-variables.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,14 @@ You can learn more about state management from this video:
4949
:::
5050

5151

52+
## Rebuild [Action]
5253

54+
The **Rebuild** action allows you to refresh a page or a component’s UI. This is especially useful when data changes dynamically; for example, after an API call, a database update, a custom action, or a class method modifies the internal state, and you want the latest data or UI state to be reflected instantly.
5355

56+
The Rebuild action provides different update types depending on where it is used:
57+
58+
- **Rebuild Page:** When on a page, you will see the **Rebuild Current Page** option, which refreshes the entire page’s UI.
59+
- **Rebuild Component:** When on a component, you will see the **Rebuild Current Component** option, which refreshes only that specific component.
60+
- **Rebuild Containing Page:** When on a component, you will see this option as well, which refreshes the entire page that contains the component. For example, if you have a **"Confirm"** button inside a dialog component that updates an order’s status, selecting this action will refresh the parent page to instantly show the updated order list.
61+
62+
![rebuild](imgs/rebuild.avif)

docs/resources/data-representation/app-state.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ Here's a quick guide to updating the app state variable. We need to add an actio
114114
</iframe>
115115
</div>
116116

117+
:::tip
118+
If you want to rebuild a page or component without updating any state variables, use the [**Rebuild**](../../ff-concepts/state-management/state-variables.md#rebuild-action) state action.
119+
:::
120+
117121
## FAQs
118122

119123
<details>

docs/resources/ui/components/component-lifecycle.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@ Type** property in your Action properties. Here's what it means:
249249
- **No Rebuild:** Choose this option when you need to update the state value without
250250
immediately reflecting the changes in the UI.
251251

252+
:::tip
253+
If you want to rebuild a component without updating any state variables, use the [**Rebuild**](../../../ff-concepts/state-management/state-variables.md#rebuild-action) state action.
254+
:::
255+
252256
:::warning[Expensive Rebuilds]
253257
Too many rebuilds can impact performance because rebuilding the widget tree
254258
frequently consumes resources and may lead to decreased responsiveness and

docs/resources/ui/pages/page-lifecycle.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,13 +327,17 @@ update, create a new Action called **Update Page State**.
327327
When updating your page state in Flutter, you'll often come across the **Update
328328
Type** property in your Action properties. Here's what it means:
329329

330-
**Rebuild Current Type:** This option triggers a re-rendering of the page,
330+
**Rebuild Current Page:** This option triggers a re-rendering of the page,
331331
ensuring
332332
that any changes to the state are reflected in the user interface (UI).
333333

334334
**No Rebuild:** Choose this option when you need to update the state without
335335
immediately reflecting the changes in the UI.
336336

337+
:::tip
338+
If you want to rebuild a page without updating any state variables, use the [**Rebuild**](../../../ff-concepts/state-management/state-variables.md#rebuild-action) state action.
339+
:::
340+
337341
:::warning[Expensive Rebuilds]
338342
Too many rebuilds can impact performance because rebuilding the widget tree
339343
frequently consumes resources and may lead to decreased responsiveness and

0 commit comments

Comments
 (0)