You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -153,43 +207,6 @@ If you prefer using JSX, that is also possible:
153
207
{% endtab %}
154
208
{% endtabs %}
155
209
156
-
With **TypeScript** you type them by:
157
-
158
-
{% tabs %}
159
-
{% tab title="Typescript" %}
160
-
```typescript
161
-
// overmind/index.ts
162
-
import { IContext } from'overmind'
163
-
164
-
import {
165
-
createStateHook,
166
-
createActionsHook,
167
-
createEffectsHook,
168
-
createReactionHook
169
-
} from'overmind-vue/vu3'
170
-
import { state } from'./state'
171
-
import*asactionsfrom'./actions'
172
-
173
-
exportconst config = {
174
-
state,
175
-
actions
176
-
}
177
-
178
-
exporttypeContext=IContext<{
179
-
state:typeofconfig.state
180
-
actions:typeofconfig.actions
181
-
}>
182
-
183
-
exportconst hooks = {
184
-
state: createStateHook<Context>(),
185
-
actions: createActionsHook<Context>(),
186
-
effects: createEffectsHook<Context>(),
187
-
reaction: createReactionHook<Context>()
188
-
}
189
-
```
190
-
{% endtab %}
191
-
{% endtabs %}
192
-
193
210
## Plugin
194
211
195
212
Vue has a plugin system that allows us to expose Overmind to all components. This allows minimum configuration and you just use state etc. from any component.
0 commit comments