react.dev
react.dev copied to clipboard
Add "Added in <version>" note for each part of the stable API
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.
Size changes
📦 Next.js Bundle Analysis for react-dev
This analysis was generated by the Next.js Bundle Analysis action. 🤖
Three Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
Page | Size (compressed) | First Load |
---|---|---|
/404 |
77.6 KB (🟡 +348 B) |
181.55 KB |
/500 |
77.59 KB (🟡 +347 B) |
181.54 KB |
/[[...markdownPath]] |
79.14 KB (🟡 +348 B) |
183.09 KB |
Details
Only 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 next/link
is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
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).
I don't think this is quite the right design but the rough idea seems good.
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 :muscle:
EDIT: My "inspiration" for the proposed implementation were the lodash docs
BTW, this is one example of why I believe this PR has value. People not being sure since when a particular feature exists, falsely leading them to believe they can't use it
Also, not trying to be annoying here :sweat_smile:, but I would like to know more of your thoughts about this; about its fate. Would you consider adding it? Like I said I am willing to work on any feedback you give if it means it gets merged.
Thanks