We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Seems one cannot export multiple components from a single module. Is this by design? For example, in TestModule.js:
TestModule.js
import React from 'react' export class ThingOne extends React.Component { render () { return ( <div>Thing one here!</div> ) } } export class ThingTwo extends React.Component { render () { return ( <div>Thing two here!</div> ) } }
yields the error Error parsing component Test/Test.js: Multiple exported component definitions found. A single export works as expected.
Error parsing component Test/Test.js: Multiple exported component definitions found.
Is there a pattern for multiple exports I should be aware of?
Thanks!
The text was updated successfully, but these errors were encountered:
It's not supported by react-docgen which is parsing components within BlueKit. Modules have to export a single component, and only that component is analyzed. https://github.com/reactjs/react-docgen#guidelines-for-default-resolvers-and-handlers
Modules have to export a single component, and only that component is analyzed.
Sorry, something went wrong.
carte-blanche had the same issue. They reference a solution for the same use case in react-styleguidist.
carte-blanche
react-styleguidist
Maybe this could work here also?
No branches or pull requests
Seems one cannot export multiple components from a single module. Is this by design? For example, in
TestModule.js
:yields the error
Error parsing component Test/Test.js: Multiple exported component definitions found.
A single export works as expected.Is there a pattern for multiple exports I should be aware of?
Thanks!
The text was updated successfully, but these errors were encountered: