storybookjs/babel-plugin-react-docgen

If using reacts injectIntl to wrap component __docgenInfo is undefined

Closed this issue · 2 comments

Hi, I have been going through some open issues in react-docgen and some closed issues here about HOC's not having docgenInfo and I could not find solution.

I understand its not trivial, but did someone find a way how to solve this problem?

Basically the moment I will use injectIntl to wrap any component I will lose docgenInfo.

Example:

import * as React from 'react';
import { injectIntl } from 'react-intl';

class Component extends React.Component<Props, void> {
...
}

export default injectIntl(Component);
import Component from './Component';

console.log(Component.__docgenInfo); // is undefined

I am using

"babel-plugin-react-docgen": "2.0.0",
"react-docgen": "3.0.0-rc.1"

Thanks

Any updates on this folks? @VladimirPittner Did you manage to work around this problem?

Think this is fixed by #74, thanks @salmanm