Skip to content

Commit cb60d98

Browse files
Copilothotlong
andcommitted
Add workspace configuration and CHANGELOG for MSW React example
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent b6ffbba commit cb60d98

File tree

5 files changed

+474
-2
lines changed

5 files changed

+474
-2
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# @objectstack/example-msw-react-crud
2+
3+
## 1.0.0
4+
5+
### Major Features
6+
7+
- Initial release of MSW + React CRUD example
8+
- Complete CRUD operations (Create, Read, Update, Delete) for tasks
9+
- Integration with @objectstack/client for all API calls
10+
- MSW browser worker setup for API mocking
11+
- React components demonstrating best practices:
12+
- TaskList component for displaying and managing tasks
13+
- TaskForm component for creating and editing tasks
14+
- TaskItem component for individual task display
15+
- Comprehensive README with setup instructions and usage examples
16+
- Full TypeScript support with proper type definitions
17+
- Vite development server and build configuration
18+
- Styled UI with modern CSS

examples/ui/msw-react-crud/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,10 @@
2323
"msw": "^2.0.0",
2424
"typescript": "^5.0.0",
2525
"vite": "^5.4.11"
26+
},
27+
"msw": {
28+
"workerDirectory": [
29+
"public"
30+
]
2631
}
27-
}
32+
}

examples/ui/msw-react-crud/src/mocks/browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* MSW Browser Worker Setup
33
*
44
* This file sets up Mock Service Worker in the browser to intercept
5-
* API calls and return mock data using ObjectStack's MSW plugin.
5+
* API calls and return mock data following ObjectStack API conventions.
66
*/
77

88
import { setupWorker } from 'msw/browser';

0 commit comments

Comments
 (0)