From b57cf7ac2164187b64025fa6a0c07f93f5e4ad80 Mon Sep 17 00:00:00 2001 From: christophbeberweil Date: Tue, 28 Nov 2023 12:12:11 +0100 Subject: [PATCH] doc: Clarify how store can be accessed outside of components (#66) Co-authored-by: Christoph Beberweil --- docs/src/dispatch.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/dispatch.md b/docs/src/dispatch.md index 2f625df..c91d4f5 100644 --- a/docs/src/dispatch.md +++ b/docs/src/dispatch.md @@ -6,13 +6,13 @@ read and write changes to state in various ways. # Creating a Dispatch -To create a dispatch, you need only provide the desired store type. +To create a dispatch, you need only provide the desired store type. This is available in **any** rust code, not just yew components. ```rust let dispatch = Dispatch::::new(); ``` -A dispatch is also given when using the functional hook. +A dispatch is also given when using the functional hook, which is only available in yew components. ```rust let (state, dispatch) = use_store::();