When editing the typescript props of a component, the changes does not get applied until I edit something else in the file that is not related to typescript.
// button.tsx
// ==========
// changing this does not update the props table
export interface Props {
label?: string
}
// changing this updates the component
function Button({ label }: Props) {
return <button>{label}</button> // changing this updates the component
}
export default Button
// button.stories.tsx
// ==================
import { Story, Meta } from '@storybook/react'
import React from 'react'
import Button, { Props } from './button'
export default {
title: 'Button',
component: Button,
} as Meta
export const Template: Story<Props> = args => <Button {...args} />
Template.args = {
label: 'Button',
}
@hipstersmoothie @gaetanmaisse @ndelangen any ideas about this one?
Things i've found so far.
framework-preset-react-docgen preset is loaded anyway it seems like we don't need the code in the CRA presetHere I changed the size prop to include the string literal 2222.

But storybook doesn't update with that.
If there is someone with more knowledge about what webpack is doing here I would be happy to pair to find the issue. The webpack plugin is pretty simple.
It taps into webpack's seal hook and appends the docgen info to the end of the module. You can find the relevant file in node_modules/react-docgen-typescript-plugin/dist/plugin.js
@ndelangen is our resident webpack expert 馃槈
@hipstersmoothie would be happy to pair program on this some time, if you'd be too, let's schedule something!
Booked for friday!
I have the same issue. If I edit the component itself I see the new docgen changes popup.
So please if you find anything, update this ticket 馃憤
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
I believe this is still an issue?
Most helpful comment
Booked for friday!