|
|
|
|
|
by matthoiland
1880 days ago
|
|
If I closed my eyes and designed the API first, it would look like the `/pages` convention – just add state "slice" files in `/store` (like `src/store/user.ts`) and then use either React hooks inside the component (like `useStore` or `useMutation`) or use something (like `getServerSideState`) on the server. Your state "slices" would export initial state, types (optionally), and an object containing getters, setters, and mutations (using Vuex concepts). |
|