From c0bd1f176bcae1ac8b79752aff9309d6cf0f840e Mon Sep 17 00:00:00 2001 From: v-byte-cpu <65545655+v-byte-cpu@users.noreply.github.com> Date: Mon, 8 Jun 2026 13:51:52 +0400 Subject: [PATCH] feat(react-vite): prefer @msw/data for stateful mocks --- .../references/platform-services-and-di.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/skills/react-vite-structure/references/platform-services-and-di.md b/skills/react-vite-structure/references/platform-services-and-di.md index bb7ab16..31eadf7 100644 --- a/skills/react-vite-structure/references/platform-services-and-di.md +++ b/skills/react-vite-structure/references/platform-services-and-di.md @@ -131,7 +131,11 @@ export const webProductService: ProductService = { ## Additional Platform Implementations -Add `tauri`, `mock`, or `composite` implementations only when the feature needs them. The interface still stays in the feature: +Add `tauri`, `mock`, or `composite` implementations only when the feature needs them. + +For first-pass `mock` service implementations that need reusable state, CRUD, filtering, or relations, prefer an `@msw/data`-backed store over ad hoc arrays or maps. Simple injected fake services are still fine for one-off tests, static Storybook states, or behavior that does not need realistic state transitions. + +The interface still stays in the feature: ```ts // features/projects/services/projectService.ts