|
|
|
|
|
by sktrdie
1740 days ago
|
|
I think what most developers use Storybook for is development in isolation which is essentially what TDD is about. In fact what we end up doing with Storybook is that we create the "stories" (literally .stories.ts files) that renders each component with a specific permutation of props. However this is pretty much a copy of the .test.ts file we write for the component itself - so many times it's literally doing pretty much the same stuff. I find it so weird that in 2021 we don't have a way to just render our test files (which essentially is using some server-side dom abstraction) also to a browser so we can view the component and develop against it. Then we wouldn't need storybook or story files that describe how a component is rendered - that's the test file responsibility. |
|
https://github.com/storybookjs/storybook/tree/main/addons/st...