Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If using reacts injectIntl to wrap component __docgenInfo is undefined #61

Closed
VladimirPittner opened this issue Nov 1, 2018 · 2 comments

Comments

@VladimirPittner
Copy link

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

@salmanm
Copy link
Contributor

salmanm commented Sep 26, 2019

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

@danielduan
Copy link
Member

danielduan commented Oct 24, 2019

Think this is fixed by #74, thanks @salmanm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants