Skip to content

Commit e677937

Browse files
Copilothotlong
andcommitted
Update QUICKSTART.md to use new ObjectKernel API
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent c940669 commit e677937

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

examples/msw-react-crud/QUICKSTART.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ Now just **3 lines** with auto-mocking:
7272

7373
```typescript
7474
// src/mocks/browser.ts - NEW WAY
75-
const mswPlugin = new MSWPlugin({ baseUrl: '/api/v1' });
76-
const runtime = new ObjectStackKernel([appConfig, mswPlugin]);
77-
await runtime.start(); // Auto-mocks ALL endpoints!
75+
const kernel = new ObjectKernel();
76+
kernel.use(new AppManifestPlugin(appConfig));
77+
kernel.use(new MSWPlugin({ baseUrl: '/api/v1' }));
78+
await kernel.bootstrap(); // Auto-mocks ALL endpoints!
7879
```
7980

8081
## 📦 How It Works
@@ -140,10 +141,13 @@ const customHandlers = [
140141
)
141142
];
142143

143-
const mswPlugin = new MSWPlugin({
144+
const kernel = new ObjectKernel();
145+
kernel.use(new AppManifestPlugin(appConfig));
146+
kernel.use(new MSWPlugin({
144147
customHandlers, // Add your custom handlers
145148
baseUrl: '/api/v1'
146-
});
149+
}));
150+
await kernel.bootstrap();
147151
```
148152

149153
## Troubleshooting

0 commit comments

Comments
 (0)