Skip to content

Commit

Permalink
Merge pull request #54 from HubSpot/timmfin-patch-3
Browse files Browse the repository at this point in the history
Fix "GraphQL and Storybook" link in docs
  • Loading branch information
timmfin authored Apr 24, 2024
2 parents de976db + c8ed2de commit aa0b6e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference/cms-dev-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ Visit the page as a "preview". You can do this from the page editor by clicking
## Storybook

`cms-dev-server` includes a [Storybook](https://storybook.js.org/) integration. Pass a `--storybook` option when starting the server to start a Storybook instance alongside the built-in dev server. You may then add `.stories.jsx` files alongside your components to build stories for testing or development. At the root http://hslocal.net:3000 page there should be a link to the Storybook UI for your project.
To make building stories for HubSpot modules easier, `cms-dev-server` provides helpers to auto-generate `argTypes` based on module fields. See the [GraphQL and Storybook](https://github.com/HubSpot/cms-react/tree/main/graphql-storybook/gql-storybook-project/gql-storybook-app) example project for usage of `moduleStory()`.
To make building stories for HubSpot modules easier, `cms-dev-server` provides helpers to auto-generate `argTypes` based on module fields. See the [GraphQL and Storybook](https://github.com/HubSpot/cms-react/tree/main/examples/graphql-storybook/gql-storybook-project/gql-storybook-app) example project for usage of `moduleStory()`.
Storybook is built with client components in mind, so components that cross island boundaries can have unexpected lifecycle behavior when rendered in a story. Because server-only components never make it to the browser, they cannot be hot reloaded and a full re-render is necessary to update the server response. To fully emulate hybrid rendering in Storybook at the cost of hot module reloading, you may use `moduleStoryWithIsland()` in your story in place of `moduleStory()`.

0 comments on commit aa0b6e0

Please sign in to comment.