Skip to content

Commit

Permalink
doc: Update ReactterScope widget documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
CarLeonDev committed Jun 12, 2024
1 parent 195c35b commit b77ea76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/src/content/docs/widgets/reactter_scope.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { HM, HT } from '@/components/Highlight';
The <HT>`ReactterScope`</HT> widget serves as an entry point for Reactter, allowing you to use any consumer(such as <HT>`ReactterConsumer`</HT>, <HT>`ReactterSelect`</HT>, <HT>`ReactterComponent`</HT>, <HM>`BuildContext.watch`</HM>, <HM>`BuildContext.select`</HM>) to observe state changes within the subtree of the widget it wraps, without the need to explicitly define dependencies.

:::caution
The <HT>`ReactterScope`</HT> widget is not mandatory but if you use any consumers without defining dependencies, and their ancestor widgets are not wrapped by the <HT>`ReactterScope`</HT> widget, it will throw <HT>`ReactterScopeNotFoundException`</HT> error. Therefore, always ensure that the <HT>`ReactterScope`</HT> widget is correctly placed in the widget tree hierarchy.
The <HT>`ReactterScope`</HT> widget is optional, but if you use any consumers without defining dependencies and their ancestor widgets are not wrapped by it, a ReactterScopeNotFoundException error will be thrown. Therefore, make sure this widget is correctly placed in the widget tree hierarchy.

To prevent such errors, it is recommended to wrap the root widget of your application with the <HT>`ReactterScope`</HT> widget.
To avoid such errors, it is advisable to wrap your application's root widget with it.
:::

## Syntax
Expand Down

0 comments on commit b77ea76

Please sign in to comment.