Skip to content

Commit

Permalink
Fix typos & ts check
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Nov 30, 2023
1 parent a1889c5 commit 1fa44fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ In Storybook 8.0 we are introducing a new icon library available with `@storyboo

#### React-docgen component analysis by default

In Storybook 7, we used `react-docgen-typescript` to analyze React component props and auto-generated control. In Storybook 8, we have moved to `react-docgen` as the new default. `react-docgen` is dramatically more efficient, shaving seconds off of dev startup times. However, it only analyzes basic TypeScript constructs.
In Storybook 7, we used `react-docgen-typescript` to analyze React component props and auto-generate controls. In Storybook 8, we have moved to `react-docgen` as the new default. `react-docgen` is dramatically more efficient, shaving seconds off of dev startup times. However, it only analyzes basic TypeScript constructs.

We feel `react-docgen` is the right tradeoff for most React projects. However, if you need the full fidelity of `react-docgen-typescript`, you can opt-in using the following setting in `.storybook/main.js`:

Expand Down
4 changes: 2 additions & 2 deletions code/lib/cli/src/automigrate/fixes/react-docgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ export const reactDocgen: Fix<Options> = {
but doesn't handle all TypeScript constructs.
We can update your config to continue to use "react-docgen-typescript",
though we recommend giving "react-docgen" or a much faster dev experience.
though we recommend giving "react-docgen" for a much faster dev experience.
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#react-docgen-component-analysis-by-default
`;
},

async run({ dryRun, mainConfigPath }) {
if (!dryRun) {
await updateMainConfig({ mainConfigPath, dryRun }, async (main) => {
await updateMainConfig({ mainConfigPath, dryRun: !!dryRun }, async (main) => {
logger.info(`✅ Setting typescript.reactDocgen`);
if (!dryRun) {
main.setFieldValue(['typescript', 'reactDocgen'], 'react-docgen-typescript');
Expand Down

0 comments on commit 1fa44fc

Please sign in to comment.