-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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 "Added in <version>" note for each part of the stable API #6308
base: main
Are you sure you want to change the base?
Add "Added in <version>" note for each part of the stable API #6308
Conversation
Size changes📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Three Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 10% or more, there will be a red status indicator applied, indicating that special attention should be given to this. |
...any thoughts on this? |
Thoughts @mattcarrollcode? I don't think this is quite the right design but the rough idea seems good. There might also be certain parts of the API that were added later. I wonder if something more like the MDN browser compatibility table later in the page would make sense (perhaps comparing RSC/SSR/Client…? not sure). |
For the record, if the idea ends up being ok'ed, I am fully willing to take it upon me to implement whatever design the team deems fitting 💪 EDIT: |
@@ -2,6 +2,10 @@ | |||
title: flushSync | |||
--- | |||
|
|||
<AddedInVersion version="16" /> | |||
|
|||
[//]: # (According to the linked answer from Dan Abramov, this was supposed to be released during v16, but is only officially documented in v18.0.0 --> https://github.com/facebook/react/issues/11527#issuecomment-360199710) |
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.
Remove this and add as a review comment or comment it in mdx
[//]: # (According to the linked answer from Dan Abramov, this was supposed to be released during v16, but is only officially documented in v18.0.0 --> https://github.com/facebook/react/issues/11527#issuecomment-360199710) | |
{/*(According to the linked answer from Dan Abramov, this was supposed to be released during v16, but is only officially documented in v18.0.0 --> https://github.com/facebook/react/issues/11527#issuecomment-360199710)*/} |
or
[//]: # (According to the linked answer from Dan Abramov, this was supposed to be released during v16, but is only officially documented in v18.0.0 --> https://github.com/facebook/react/issues/11527#issuecomment-360199710) |
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.
Resolved in 2fbf483
@@ -2,6 +2,10 @@ | |||
title: Children | |||
--- | |||
|
|||
<AddedInVersion version="0.10.0" /> | |||
|
|||
[//]: # (Does not show up in changelogs but only appears in v0.10.0 docs based on https://web.archive.org/ research) |
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.
[//]: # (Does not show up in changelogs but only appears in v0.10.0 docs based on https://web.archive.org/ research) | |
{/*(Does not show up in changelogs but only appears in v0.10.0 docs based on https://web.archive.org/ research)*/} |
[//]: # (Does not show up in changelogs but only appears in v0.10.0 docs based on https://web.archive.org/ research) |
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.
Thanks, changed in 2fbf483. The previous syntax was just me ctrl + /
in my editor and it adding the syntax for what it thought was an mdx comment.
This PR introduces a new "Added in <version_number>" section (which links to the relevant changelog) for each part of the API that is currently included in the stable versions.
Only part that gave me some trouble and could not exactly pinpoint when it was added was
flushSync
which must have been released somewhere during v16 according to this but it only got officially documented in the v18 docs.If someone knows the exact version this was added I will gladly add it.