Summary
In this chapter, our focus was on building base components that we will reuse in our application.
We started by configuring the Chakra UI provider and theming. Then we displayed the components on the landing page for testing purposes. They were not doing much, so we implemented them. The point of defining shared components is that we can reuse them anywhere, which makes development easier in the long run. What the components are doing here is not very important. The important thing is to think about creating shared components as a base for the application.
We then needed to preview the components somewhere and since doing that on a page is not a very elegant solution, we chose Storybook. We covered its configuration, and then we defined a couple of stories for the Button
component. The stories are written in Component Story Format (CSF), which is a standard for how to write component examples.
As an exercise at the end of this chapter, there were further stories to...