Skip to content
New issue

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

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

Already on GitHub? # to your account

Error message for missing component should be clearer about usage #609

Closed
rkaramc opened this issue Nov 9, 2016 · 1 comment
Closed

Comments

@rkaramc
Copy link
Contributor

rkaramc commented Nov 9, 2016

Through issue #532 and commit #534, a clearer error message has been added to indicate that a valid component has not been provided in the story.

However, the error message should be clearer and actionable. I misread the current error message as recommending the ()=>{} syntax!!

Current message:

Expecting a React element from the story: "basic" of "Game of Life".
Did you forget to return the React element from the story?
Maybe check you are using "() => {<MyComp>}" instead of "() => (<MyComp>)" when defining the story.

Proposed message:

Expecting a React element from the story: "basic" of "Game of Life".
Did you forget to return the React element from the story?
Use "() => (<MyComp/>)" or "() => { return <MyComp/>; }" when defining the story.

Thanks
Rajeev

@arunoda
Copy link
Member

arunoda commented Nov 10, 2016

You are correct.

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

No branches or pull requests

3 participants