-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
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
ADD async render support #1253
ADD async render support #1253
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1253 +/- ##
========================================
Coverage 14.35% 14.35%
========================================
Files 201 201
Lines 4612 4612
Branches 499 614 +115
========================================
Hits 662 662
+ Misses 3522 3426 -96
- Partials 428 524 +96
Continue to review full report at Codecov.
|
4357ee3
to
f747828
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty straightforward. But needs:
- docs including a motivating example
- test case
const error = { | ||
title: `Expecting a React element from the story: "${selectedStory}" of "${selectedKind}".`, | ||
description: stripIndents` | ||
return Promise.resolve(story(context)).then(element => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be nice to have an example usage of this somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!, thanks for the review 👍
I'm dropping this for now, and will revisit this at a later stage. |
Please do NOT remove remote branch |
Issue: -add is sync but sometimes we want to do some async setup on first render-
What I did
Add support for a function in
.add()
that returns a PromiseTodo
How to test
Should add something to the kitchen sink probably.