{"action":"created","issue":{"url":"https://api.github.com/repos/styleguidist/react-styleguidist/issues/1504","repository_url":"https://api.github.com/repos/styleguidist/react-styleguidist","labels_url":"https://api.github.com/repos/styleguidist/react-styleguidist/issues/1504/labels{/name}","comments_url":"https://api.github.com/repos/styleguidist/react-styleguidist/issues/1504/comments","events_url":"https://api.github.com/repos/styleguidist/react-styleguidist/issues/1504/events","html_url":"https://github.com/styleguidist/react-styleguidist/pull/1504","id":542696011,"node_id":"MDExOlB1bGxSZXF1ZXN0MzU3MDg3Njc4","number":1504,"title":"Honor default exports over named exports","user":{"login":"Lazyuki","id":18208178,"node_id":"MDQ6VXNlcjE4MjA4MTc4","avatar_url":"https://avatars3.githubusercontent.com/u/18208178?v=4","gravatar_id":"","url":"https://api.github.com/users/Lazyuki","html_url":"https://github.com/Lazyuki","followers_url":"https://api.github.com/users/Lazyuki/followers","following_url":"https://api.github.com/users/Lazyuki/following{/other_user}","gists_url":"https://api.github.com/users/Lazyuki/gists{/gist_id}","starred_url":"https://api.github.com/users/Lazyuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lazyuki/subscriptions","organizations_url":"https://api.github.com/users/Lazyuki/orgs","repos_url":"https://api.github.com/users/Lazyuki/repos","events_url":"https://api.github.com/users/Lazyuki/events{/privacy}","received_events_url":"https://api.github.com/users/Lazyuki/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-12-26T23:48:30Z","updated_at":"2019-12-30T09:16:37Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/styleguidist/react-styleguidist/pulls/1504","html_url":"https://github.com/styleguidist/react-styleguidist/pull/1504","diff_url":"https://github.com/styleguidist/react-styleguidist/pull/1504.diff","patch_url":"https://github.com/styleguidist/react-styleguidist/pull/1504.patch"},"body":"When you have a component like \r\n\r\n```tsx\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nexport const C: React.FC = () => {\r\n  ...\r\n}\r\n\r\nconst StyledC = styled(C)``;\r\n\r\nexport default StyledC;\r\n```\r\nso that you can use non-styled (name-exported) components for testing, styleguidist picks up the named export instead of the default export and breaks the styling in examples. \r\n\r\nIf I understand [this part of the doc](https://react-styleguidist.js.org/docs/components.html#default-vs-named-exports) correctly, isn't this supposed to be the case? As in it will try to find\r\n1. default exports \r\n2. if not found => single named export\r\n3. if not found => named export with the same name\r\n\r\nI'm aware there are a few workarounds to get my example above working, but just in case the current behavior isn't intended. "},"comment":{"url":"https://api.github.com/repos/styleguidist/react-styleguidist/issues/comments/569622604","html_url":"https://github.com/styleguidist/react-styleguidist/pull/1504#issuecomment-569622604","issue_url":"https://api.github.com/repos/styleguidist/react-styleguidist/issues/1504","id":569622604,"node_id":"MDEyOklzc3VlQ29tbWVudDU2OTYyMjYwNA==","user":{"login":"sapegin","id":70067,"node_id":"MDQ6VXNlcjcwMDY3","avatar_url":"https://avatars2.githubusercontent.com/u/70067?v=4","gravatar_id":"","url":"https://api.github.com/users/sapegin","html_url":"https://github.com/sapegin","followers_url":"https://api.github.com/users/sapegin/followers","following_url":"https://api.github.com/users/sapegin/following{/other_user}","gists_url":"https://api.github.com/users/sapegin/gists{/gist_id}","starred_url":"https://api.github.com/users/sapegin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sapegin/subscriptions","organizations_url":"https://api.github.com/users/sapegin/orgs","repos_url":"https://api.github.com/users/sapegin/repos","events_url":"https://api.github.com/users/sapegin/events{/privacy}","received_events_url":"https://api.github.com/users/sapegin/received_events","type":"User","site_admin":false},"created_at":"2019-12-30T09:16:37Z","updated_at":"2019-12-30T09:16:37Z","author_association":"MEMBER","body":"@elevatebart Yeah, make sense! If it's going to be ready soon."}}
{"actor":{"display_login":"sapegin"}}