Open
Description
Current behavior
Components that return an array lead to the following error (via react-styleguidist):
Warning: some/folder/index.jsx matches a pattern defined in “components” or “sections” options in your style guide config but doesn’t export a component.
It usually happens when using third-party libraries, see possible solutions here: https://react-styleguidist.js.org/docs/thirdparties.html
To reproduce
/**
* @param {Props} props props
* @property {Array.<Etcetera>} etc
* @returns {React.Node} ...
*/
const Contents = ({ contents }: Props) =>
contents.map(data => {
switch (data.__typename) {
case 'Something':
return (
<Something children={data.children} key={data.id} />
)
}
})
Expected behavior
No warning