Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Suspense and lazy #1593
Introduce Suspense and lazy #1593
Changes from 4 commits
5b28ba5
1d525f1
eb9c7db
20cb0ae
104649c
b8bb86e
5036536
cdd73b7
c058372
a37853c
861e98d
54aaf57
bc80d46
de9588c
563fffa
2a527ed
3f59a37
a08684e
9dcf70b
5282e85
96da3ba
96a9fbb
b9c1d74
ada75fe
f39793a
8a93332
96932c7
7b8ea43
8677fa7
26ae430
30ce608
2c63c59
85075cb
23970fb
d5df946
a22531b
0431636
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Maybe move to here?
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.
The
continue
results in traversing up the tree. This would break the tree traversing AFAIKThere 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.
Maybe we can move this section into
preact/debug
. ASuspense
component without a fallback doesn't seem to make much sense, so we could just always warn on that. This would also keep core small and tiny 馃帀EDIT: Removing that would save
158 B
馃憤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.
This also allows the recheck of isSuspsend and suspendingComponent, so that will save a lot
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 still throw the
Missing Suspense
error on thesuspendingComponent
.Would you want to save some bytes and just throw the error at the end of the function instead of the
suspendingComponent
?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.
What he's saying is to throw it in a hook from preact/debug since it doesn't really matter in production anyway. I also think that is the best approach to maintain our lightweight profile
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.
Can you guys give me a hint on where I could add this to
preact/debug
. I did not find a proper place to add it