-
Notifications
You must be signed in to change notification settings - Fork 7.8k
[Beta] Initial API doc for Suspense #4955
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
Conversation
Size Changes📦 Next.js Bundle AnalysisThis analysis was generated by the next.js bundle analysis action 🤖 This PR introduced no changes to the javascript bundle 🙌 |
acdab2a to
49c2830
Compare
|
If we're comfortable adding a dependency on launch, I feel like you could make the sandboxes use the |
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 the "code step" usage here is a bit more distracting than helpful. I'd prefer if we keep it limited and instead of highlighting pieces of JSX in code, we use it for terms like "content" and "loading indicator" and try to use at most three (ideally two) colors at the time for any given explanation. We also don't have to highlight all matches. E.g. I think it would actually be better to remove highlights here but add them in the sentence above the snippet for "its children" and "fallback prop" instead.
Ditto for sections below.
gaearon
left a comment
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.
let's tweak the highlight thing.
ideally we need some example. e.g. at least lazy(). i think it should work in the sandbox?
use() with experimental build could also be nice. you can override which react build is used by specifying a package.json file in the sandbox. you can search markdown for examples of package.json file, we use this for adding Immer to some pages
49c2830 to
125ccff
Compare
125ccff to
62b413b
Compare
|
any appetite for adding the sandbox with lazy? i was thinking maybe add a large markdown library as a dep of a component and trigger it on click. might be enough to show the lazy loading if codesandbox actually supports dynamic imports (i think it does?) |
This doesn't include everything but I think it's good enough for a start. I didn't add any interactive examples yet because I want to use the `use` API, so I'll wait until that's documented.
62b413b to
cb314a8
Compare
This doesn't include everything but I think it's good enough for a start.
I didn't add any interactive examples yet because I want to use the
useAPI, so I'll wait until that's documented.