diff --git a/packages/provider/README.md b/packages/provider/README.md index 5b8f88341141a1c76ef6f057efb17f0158278521..5fdc93127a92318050810cc818974bd572fab7d4 100644 --- a/packages/provider/README.md +++ b/packages/provider/README.md @@ -45,7 +45,7 @@ All other components are also inherent providers (see below), so you don't reall of other components. The use of `dbp-provider` is mainly suggested being used for namespacing (e.g. different languages or entry point urls on the same page) or to deliver attribute changes across different components. -### Flow +### Examples #### Example 1 - Simple communication @@ -73,6 +73,8 @@ sequenceDiagram P->>PS: "lang" was updated to "en" ``` +##### Flow + 1) The language selector propagates a change of `lang` (because the user clicked on it) 2) The provider receives that event, because it has the attribute `lang` set 3) The provider executes a callback with the updated value for `lang` in all components that subscribed `lang` @@ -113,6 +115,8 @@ sequenceDiagram P1->>PS: "auth" was updated to "{...json...}" ``` +##### Flow + 1) The language selector propagates a change of `lang` (because the user clicked on it) 2) The provider 2 receives that event, because it has the attribute `lang` set 3) The provider 2 executes a callback with the updated value for `lang` in all components that subscribed `lang`