Wrapping up

Conclusion on data fetching strategies in Storybook.

Important: Accessing the code

If you want to access the code for the end of this module, it is available in the module-03-end branch in your repo, and you can also find it in the same branch at the Storybook for react apps template repo.

That's it! We have gone through a few examples to tackle data fetching and Storybook, and I hope you can apply this knowledge in your project.

Okay, so what solution should I choose?#

As with everything in software development: it depends. It is really up to you and can vary per situation. I recommend analyzing your situation and seeing what it tells you. There is no absolute right way of doing something.

Maybe it's a good idea to separate the logic and UI of your components, making them more easily testable with the container pattern.


This page is a preview of Storybook for React Apps

Start a new discussion. All notification go to the author.