Hacker News new | ask | show | jobs
by Vinnl 834 days ago
I've used both MSW and Storybook, and they're both fine. They both have some advantages and disadvantages. One advantage of Storybook is that getting to a particular state on a particular page is a matter of selecting the right story, whereas with our MSW setup, I have to simulate a login with a user with the right characteristics, and then navigate through our UI to get to the step in the flow I'm looking for.

In another project we've adopted React Server Components, and no longer have an API - so MSW is not even an option there. Storybook does work, although it's still a bit of a hassle to have to split our Server Components into two components, only one of which actually makes use of server-side APIs.