@stordco/msw-toolbar
v0.2.3
Published
A simple utility to make your MSW experience a little bit better.
Downloads
342
Readme
MSW Toolbar
A simple utility to make your MSW experience a little bit better.
Requirements
Usage
There are two primary ways to use this component:
As a wrapper around your entire app
- When you structure things like the below, you guarantee that all requests will be intercepted because
children
will not be rendered until the worker has successfully started.
<MSWToolbar {...props}> <YourApp /> </MSWToolbar>
- When you structure things like the below, you guarantee that all requests will be intercepted because
As a regular component in the tree
- When you do this, all requests should be intercepted, but it's not guaranteed because there can be timing issues with the service worker registration.
<YourApp> <MSWToolbar {...props} /> <Header /> <Content /> <Footer /> </YourApp>