News for hackers. Stuff that matters.
Re:Next.js 10.2 by matthoiland on Wednesday April 28, 2021 @12:45PM (#26971416)
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).

There are no comments on this comment yet.