diff --git a/app/.vitepress/theme/components/createState.vue b/app/.vitepress/theme/components/createState.vue index 725f85f..3191e3c 100644 --- a/app/.vitepress/theme/components/createState.vue +++ b/app/.vitepress/theme/components/createState.vue @@ -5,7 +5,7 @@ import * as React from "react"; import * as ReactDOM from "react-dom/client"; const divRef = ref(null); -const useCountState = createState(withNamespace(() => ({ data: { count: 1 } }), { namespace: "count" })); +const useCountState = createState(withNamespace(() => ({ data: { count: 1 } }), { namespace: "count", reduxDevTool: true })); const App = () => { const count = useCountState((state) => state.data); diff --git a/app/.vitepress/theme/components/createStateWithActionsMiddleware.vue b/app/.vitepress/theme/components/createStateWithActionsMiddleware.vue index f49efce..88e444a 100644 --- a/app/.vitepress/theme/components/createStateWithActionsMiddleware.vue +++ b/app/.vitepress/theme/components/createStateWithActionsMiddleware.vue @@ -11,7 +11,7 @@ const useCountState_v2 = createState(withActions(() => ({ count: 1 }), { generat const useCountState_v3 = createState(withActions(() => ({ count: 1 }), { generateActions: (state) => { return { add: (v) => { console.log(v); state.count++ }, del: () => state.count-- } } })); -const useCountState_v4 = createState(() => ({ count: 1 }), { withActions: (state) => { return { add: (v) => { console.log(v); state.count++ }, del: () => state.count-- } }, withNamespace: 'count_4' }); +const useCountState_v4 = createState(withNamespace(() => ({ count: 1 }), { namespace: 'foo_2', reduxDevTool: true }), { withActions: (state) => { return { add: (v) => { console.log(v); state.count++ }, del: () => state.count-- } }, withNamespace: 'count_4' }); const App = () => { const { count, add } = useCountState_v4(); diff --git a/app/.vitepress/theme/components/createStateWithAllMiddleware.vue b/app/.vitepress/theme/components/createStateWithAllMiddleware.vue index cf39c04..c9c9af0 100644 --- a/app/.vitepress/theme/components/createStateWithAllMiddleware.vue +++ b/app/.vitepress/theme/components/createStateWithAllMiddleware.vue @@ -1,13 +1,13 @@