You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the MSW add-on with React Query. Am experiencing an issue wherein the last declared handler is what's used for all stories in a file.
The "Error state" handler is what's applied to all stories in the file. If I swap "Loading state" and "Error state", it's the "Loading state" that's applied to all stories in the file. As an additional check, I changed the endpoint of MockedDefault's handler to some/other/endpoint, I still receive the response from the "Error state" handler. My assumption is MockedDefault should throw an error, since the story has an unhandled request?
For anyone else who encounters this, it took me too long to realise that this works fine when you're looking at the individual canvases but not when you're looking at them all at once on the Docs tab.
I'm trying to use the MSW add-on with React Query. Am experiencing an issue wherein the last declared handler is what's used for all stories in a file.
The "Error state" handler is what's applied to all stories in the file. If I swap "Loading state" and "Error state", it's the "Loading state" that's applied to all stories in the file. As an additional check, I changed the endpoint of
MockedDefault
's handler tosome/other/endpoint
, I still receive the response from the "Error state" handler. My assumption isMockedDefault
should throw an error, since the story has an unhandled request?This is what my
.storybook/preview.js
looks like:Packages:
The text was updated successfully, but these errors were encountered: