The frontend already knows how to create a note, mark it as done, and send it to the trash. The mock doesn't. Every GET /api/notes returns the same array, the POST leaves no trace, and the 409 for a duplicate title is something you have to invent by hand. That's enough for a static list. It falls short as soon as an optimistic UI 1 , a trash view, or a conflict shows up.
In Mock Your API in 5 Minutes with JSON and Switch Success and Error Without Touching Your Frontend , the mock was a fixed body and a nameResponse you flipped. This is where the store comes in: an in-memory collection, declared in the same JSON, with list , get , create , update , patch , delete , and restore actions. The examples use http-mock-json 6.0.1, and every response in this article comes from actually running it.
This isn't a guide to every filter, relation, or on-disk persist.…