Closed smeijer closed 4 years ago
@smeijer It sounds like you have a function without a name, can you confirm?
Yes, that I can confirm. We have a bunch of components defined without name. The file I mentioned in the opening post, holds something like:
import React, { ReactElement, FC } from 'react';
import MyContext from './MyContext';
export default function(Component): FC {
return function WrappedWithMyContext(props): ReactElement {
return (
<MyContext.Consumer>
{context => <Component {...props} mapContext={context} />}
</MyContext.Consumer>
);
};
}
Ok cool, should be an easy fix. Thanks for the quick response.
No problem. Let me know if there is a potential fix that I can test.
@smeijer Can you try the latest patch version?
Thanks, no more errors on this side :tada:
Sweet!
I'm trying to use this plugin, to get the proptypes visible in Storybook. But unfortunately, I cannot seem to start storybook with this plugin installed:
I'm not sure what info you need to get a better understanding of the error, but this is the
webpack
config I use:I'm using
babel-loader: 8.0.6
instorybook: 5.3.17