reactjs / react-docgen

A CLI and library to extract information from React component files for documentation generation purposes.
https://react-docgen.dev
MIT License
3.68k stars 298 forks source link

Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax. #904

Closed evgeniy-arapov closed 8 months ago

evgeniy-arapov commented 8 months ago

When updating to storybook@8.0.0 I get the following warnings:

SyntaxError: ./src/js/some-component.js: Decorators must be placed after the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the @decorator export class {} syntax. (24:0)

  22 | )
  23 | @observer
> 24 | export class SomeComponent extends React.Component {
     | ^
  25 |   static propTypes = {