👷♀️ Allow Production Builds in DOM Fixture
In a contribution from Jan Pöschko (poeschko), the React DOM fixture app used for manually testing multiple React DOM features, now has an option to also test production builds.
https://github.com/facebook/react/pull/13786
In a contribution from Jan Pöschko (poeschko), the React DOM fixture app used for manually testing multiple React DOM features, now has an option to also test production builds.
https://github.com/facebook/react/pull/13786
GitHub
Add a checkbox to fixtures UI to choose React production build by poeschko · Pull Request #13786 · facebook/react
This started out as a part of #13613 which will probably be closed.
🗄 Unique Thread ID for Each Partial Render to Access Contexts
To fix an issue where concurrent partial renders can have an effect on each other, a new unique thread ID is used to access contexts.
https://github.com/facebook/react/pull/14182
To fix an issue where concurrent partial renders can have an effect on each other, a new unique thread ID is used to access contexts.
https://github.com/facebook/react/pull/14182
GitHub
Use unique thread ID for each partial render to access Context by sebmarkbage · Pull Request #14182 · facebook/react
Fixes #13874
Alternative to #13877
This first adds an allocator that keeps track of a unique ThreadID index for each currently executing partial renderer. IDs are not just growing but are reused as...
Alternative to #13877
This first adds an allocator that keeps track of a unique ThreadID index for each currently executing partial renderer. IDs are not just growing but are reused as...
⏳ Scheduler: Use MessageChannel instead of window
The previous implementation of the Scheduler used window.postMessage(). Since this will trigger all message listeners which can impact performance, we’re now using a unique MessageChannel instead.
https://github.com/facebook/react/pull/14234
The previous implementation of the Scheduler used window.postMessage(). Since this will trigger all message listeners which can impact performance, we’re now using a unique MessageChannel instead.
https://github.com/facebook/react/pull/14234
GitHub
[scheduler] Post to MessageChannel instead of window by acdlite · Pull Request #14234 · facebook/react
Scheduler needs to schedule a task that fires after paint. To do this, it currently posts a message event to window. This happens on every frame until the queue is empty. An unfortunate consequence...
⚛️ React Conf Recap
A new blog post is out that summarizes everything that happened during React Conf 2018.
https://reactjs.org/blog/2018/11/13/react-conf-recap.html
A new blog post is out that summarizes everything that happened during React Conf 2018.
https://reactjs.org/blog/2018/11/13/react-conf-recap.html
legacy.reactjs.org
React Conf recap: Hooks, Suspense, and Concurrent Rendering – React Blog
This blog site has been archived. Go to react.dev/blog to see the recent posts. This year’s React Conf took place on October 25 and 26 in Henderson, Nevada, where more than 600 attendees gathered to discuss the latest in UI engineering. Sophie Alpert and…
🎉 React 16.6.3 Patch Release
After a somewhat broken 16.6.2 release, 16.6.3 is out with fixes multiple fixes for Suspense and other new React features.
https://github.com/facebook/react/releases/tag/v16.6.3
After a somewhat broken 16.6.2 release, 16.6.3 is out with fixes multiple fixes for Suspense and other new React features.
https://github.com/facebook/react/releases/tag/v16.6.3
GitHub
Release v16.6.3 · facebook/react
16.6.3 (November 12, 2018)
React DOM
Fix bugs in Suspense and lazy. (@acdlite in #14133, #14157, and #14164)
Fix highlighting of React.memo updates in React DevTools. (@bvaughn in #14141)
Fix inte...
React DOM
Fix bugs in Suspense and lazy. (@acdlite in #14133, #14157, and #14164)
Fix highlighting of React.memo updates in React DevTools. (@bvaughn in #14141)
Fix inte...
✍️ RFC: Context.write
A new RFC is out about adding support for updating managed state outside of the React UI tree that can be shared across multiple React roots.
https://github.com/reactjs/rfcs/pull/89
A new RFC is out about adding support for updating managed state outside of the React UI tree that can be shared across multiple React roots.
https://github.com/reactjs/rfcs/pull/89
GitHub
Context.write by acdlite · Pull Request #89 · reactjs/rfcs
This is a very early stage proposal. I'm opening this RFC as a way to explain the problem space. We're still exploring alternative solutions. If this were an ECMAScript proposal it'd be...
📌 Hooks RFC Merged
After over a thousand comments by community members, the core team now merged the RFC. Check out Sebastian’s closing words to learn more about the issues to address before releasing hooks.
https://github.com/reactjs/rfcs/pull/68#issuecomment-440780509
After over a thousand comments by community members, the core team now merged the RFC. Check out Sebastian’s closing words to learn more about the issues to address before releasing hooks.
https://github.com/reactjs/rfcs/pull/68#issuecomment-440780509
GitHub
RFC: React Hooks by sebmarkbage · Pull Request #68 · reactjs/rfcs
In this RFC, we propose introducing Hooks to React. See the RFC and the documentation for more details.
https://reactjs.org/docs/hooks-overview.html
View formatted RFC
(The talk video has now been ...
https://reactjs.org/docs/hooks-overview.html
View formatted RFC
(The talk video has now been ...
⏳ Reduce Scheduler Serialization Overhead
Jason Miller (developit) helped us to reduce serialization overhead when using postMessage (used inside the Scheduler package). Thank you for your contribution!
https://github.com/facebook/react/pull/14249
Jason Miller (developit) helped us to reduce serialization overhead when using postMessage (used inside the Scheduler package). Thank you for your contribution!
https://github.com/facebook/react/pull/14249
GitHub
Reduce scheduler serialization overhead by developit · Pull Request #14249 · facebook/react
In the process of switching to MessageChannel, it seems the postMessage call was modified to pass "*" (originally the target origin value from window.postMessage). This actually ends up t...
🐢 Monomorphic Object Shape for Stable Builds
Adding properties to an object disables certain optimizations. To prevent this, we don’t add properties to the main React object in stable builds anymore.
https://github.com/facebook/react/pull/14309
Adding properties to an object disables certain optimizations. To prevent this, we don’t add properties to the main React object in stable builds anymore.
https://github.com/facebook/react/pull/14309
GitHub
Prevent deopts from modifying exports object in stable builds by gaearon · Pull Request #14309 · facebook/react
Spiritual successor to #14267.
Only fixes it for stable builds (which IMO is a fair tradeoff).
Only fixes it for stable builds (which IMO is a fair tradeoff).
📝 Versioning Policy Page
A new documentation page now explains our version policy in detail. Keep in mind those changes are not new but it’s great to have them written down.
https://reactjs.org/docs/faq-versioning.html
A new documentation page now explains our version policy in detail. Keep in mind those changes are not new but it’s great to have them written down.
https://reactjs.org/docs/faq-versioning.html
legacy.reactjs.org
Versioning Policy – React
A JavaScript library for building user interfaces
🚿 Clear Fiber Fields to Avoid Memory Leak
To prevent a memory leak, some properties of a fiber are now cleared on unmount.
https://github.com/facebook/react/pull/14276
To prevent a memory leak, some properties of a fiber are now cleared on unmount.
https://github.com/facebook/react/pull/14276
GitHub
Clear fields on unmount of fiber to avoid memory leak by trueadm · Pull Request #14276 · facebook/react
This PR is a follow up to #14218. In that PR, fields that we were unsure about were nulled out. This changes the nulling out of fields to the two that we know are safe to null out – specifically, m...
⚠️ Warn about reassigning this.props
Reassigning this.props during rendering can have undesired effects. A new warning now helps to notice this unsupported behavior.
https://github.com/facebook/react/pull/14277
Reassigning this.props during rendering can have undesired effects. A new warning now helps to notice this unsupported behavior.
https://github.com/facebook/react/pull/14277
GitHub
Warn about reassigning this.props by gaearon · Pull Request #14277 · facebook/react
Related to #14224.
This adds a new warning when you reassign this.props during rendering. This has never been supported but apparently some libraries (like deprecated react-css-modules) do that.
Si...
This adds a new warning when you reassign this.props during rendering. This has never been supported but apparently some libraries (like deprecated react-css-modules) do that.
Si...
🏗 Update Dev Tools Build Tooling
The Dev Tools package is now a lot more modern due to updated Webpack and Babel versions. These newer tools also result in smaller build artifacts.
https://github.com/facebook/react-devtools/pull/1235
The Dev Tools package is now a lot more modern due to updated Webpack and Babel versions. These newer tools also result in smaller build artifacts.
https://github.com/facebook/react-devtools/pull/1235
GitHub
Upgrade dev build tooling (Babel 6 -> 7, Webpack 1 -> 4) by bvaughn · Pull Request #1235 · facebook/react-devtools
Our build tooling was super outdated, which made maintenance kind of a chore. I think this step, while not totally necessary, will help with issues like #1214 and #1090.
Build sizes
I also decided ...
Build sizes
I also decided ...
🔥 React Fire Build Infrastructure
React Fire is well underway. This week brings the new build infrastructure to host it. A work-in-progress implementation can be followed in Dominic’s personal branch.
https://github.com/facebook/react/pull/14359
React Fire is well underway. This week brings the new build infrastructure to host it. A work-in-progress implementation can be followed in Dominic’s personal branch.
https://github.com/facebook/react/pull/14359
GitHub
[Fire] Add initial build infrastructure by gaearon · Pull Request #14359 · facebook/react
This adds:
react-dom/unstable-fire entry point
react-dom/src/fire folder which is where we'll put the implementation files
A new host config in react-dom/src/fire/ReactFireHostConfig. Currentl...
react-dom/unstable-fire entry point
react-dom/src/fire folder which is where we'll put the implementation files
A new host config in react-dom/src/fire/ReactFireHostConfig. Currentl...
🗺 React 16.x Roadmap
In a new blog post, Dan lays out the future of React and when the features we’re all waiting for will be made stable.
https://reactjs.org/blog/2018/11/27/react-16-roadmap.html
In a new blog post, Dan lays out the future of React and when the features we’re all waiting for will be made stable.
https://reactjs.org/blog/2018/11/27/react-16-roadmap.html
legacy.reactjs.org
React 16.x Roadmap – React Blog
This blog site has been archived. Go to react.dev/blog to see the recent posts. You might have heard about features like “Hooks”, “Suspense”, and “Concurrent Rendering” in the previous blog posts and talks. In this post, we’ll look at how they fit together…
💺 Automate Release Infrastructure
The core team cleaned up the release noscripts to make it easier to build releases. The goal is to have a canary that is often updated.
https://github.com/facebook/react/tree/master/noscripts/release
The core team cleaned up the release noscripts to make it easier to build releases. The goal is to have a canary that is often updated.
https://github.com/facebook/react/tree/master/noscripts/release
GitHub
react/noscripts/release at main · facebook/react
The library for web and native user interfaces. Contribute to facebook/react development by creating an account on GitHub.
🖱 Easier Copying Of Component Names in Dev Tools
Thanks to Bryce Osterhaus (bryceosterhaus), it’s now a lot easier to copy the name of a component in Dev Tools.
https://github.com/facebook/react-devtools/pull/1230
Thanks to Bryce Osterhaus (bryceosterhaus), it’s now a lot easier to copy the name of a component in Dev Tools.
https://github.com/facebook/react-devtools/pull/1230
GitHub
Fixes Issue #867 - Hard to copy part of a component name by bryceosterhaus · Pull Request #1230 · facebook/react-devtools
I realize this issue already had the "someone is working on this" tag, but that was back in 2017 so I figured it was fair game.
Here is a demo of it working.
Here is a demo of it working.
📝 Add Suspense and lazy() to API Docs
The latest stable release of React brings lazy() and Suspense. These features are now referenced in the API docs as well.
https://github.com/reactjs/reactjs.org/pull/1446
The latest stable release of React brings lazy() and Suspense. These features are now referenced in the API docs as well.
https://github.com/reactjs/reactjs.org/pull/1446
GitHub
Add Suspense and lazy to API reference by gaearon · Pull Request #1446 · reactjs/reactjs.org
Fixes #1424
👋 Remove useMutationEffect
The useMutationEffect hook had a major flaw: Element refs were not initialized when they were fired. Read the PR for more information why this hook was removed.
https://github.com/facebook/react/pull/14336
The useMutationEffect hook had a major flaw: Element refs were not initialized when they were fired. Read the PR for more information why this hook was removed.
https://github.com/facebook/react/pull/14336
GitHub
Remove useMutationEffect by sophiebits · Pull Request #14336 · facebook/react
useMutationEffect has problems (namely, refs aren't attached at the time that it runs) and we're not positive it's necessary. useLayoutEffect runs at the same time as compon...
👩🏫 Validate propTypes for lazy() and memo()
The previous implementation of React.lazy() and React.memo() did not take propTypes into account. From now on, this works as expected.
https://github.com/facebook/react/pull/14298
The previous implementation of React.lazy() and React.memo() did not take propTypes into account. From now on, this works as expected.
https://github.com/facebook/react/pull/14298
GitHub
Validate propTypes for lazy() and memo() and warn about invalid patterns by gaearon · Pull Request #14298 · facebook/react
Fixes #14159.
Supersedes #14219.
Lazy
We now warn about trying to assign defaultProps and propTypes to outer wrapper (but allow it).
When propTypes is on the outer lazy() wrapper, we have undefin...
Supersedes #14219.
Lazy
We now warn about trying to assign defaultProps and propTypes to outer wrapper (but allow it).
When propTypes is on the outer lazy() wrapper, we have undefin...
🏞 New Server Rendering Infrastructure: Fizz
Work on the new Server Rendering Infrastructure Fizz has begun. The new renderer features built in support for Suspense and utilizes node streams. Check out Andrew’s talk at ZEIT earlier this year for a glimpse of what the new server renderer will be able to do.
https://github.com/facebook/react/pull/14144
Work on the new Server Rendering Infrastructure Fizz has begun. The new renderer features built in support for Suspense and utilizes node streams. Check out Andrew’s talk at ZEIT earlier this year for a glimpse of what the new server renderer will be able to do.
https://github.com/facebook/react/pull/14144
GitHub
[Fizz] New Server Rendering Infra by sebmarkbage · Pull Request #14144 · facebook/react
This adds a bunch of new stuff related to the build process for the new server renderer (Fizz).
It adds a new package react-stream. The name is temporary (but is nicely owned by @aickin).
This is e...
It adds a new package react-stream. The name is temporary (but is nicely owned by @aickin).
This is e...