🐢 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...
🔥 WIP: Base Implementation of React Fire
You can now follow along as the team is preparing the React DOM code for the upcoming React Fire updates. The changes currently include a new and lighter weight event system.
https://github.com/facebook/react/pull/14382
You can now follow along as the team is preparing the React DOM code for the upcoming React Fire updates. The changes currently include a new and lighter weight event system.
https://github.com/facebook/react/pull/14382
GitHub
[WIP] Add base implementation of React Fire by trueadm · Pull Request #14382 · facebook/react
This an initial work-in-progress PR for React Fire. Better denoscription to come at some point along with a TODO checklist. For more context, see the tracking issue #13525.
⏱ Implement pauseExecution, continueExecution, and dumpQueue for Scheduler
Kevin Chavez (mrkev) added three new methods to the Scheduler package to make it simpler to build debugger tools in the browser.
https://github.com/facebook/react/pull/14053
Kevin Chavez (mrkev) added three new methods to the Scheduler package to make it simpler to build debugger tools in the browser.
https://github.com/facebook/react/pull/14053
GitHub
Implement pauseExecution, continueExecution, dumpQueue for Scheduler by mrkev · Pull Request #14053 · facebook/react
pauseExecution: pauses the scheduler from making progress running subsequent callbacks in the queue.
continueExecution: continues executing callbacks from the queue.
dumpQueue: returns an array of ...
continueExecution: continues executing callbacks from the queue.
dumpQueue: returns an array of ...
🐶 Automated Fixture Tests
Some of the manual fixtures are now tested automatically with the help of Puppeteer, an automation helper for Chromium.
https://github.com/facebook/react/pull/14370
Some of the manual fixtures are now tested automatically with the help of Puppeteer, an automation helper for Chromium.
https://github.com/facebook/react/pull/14370
GitHub
Automated fixture tests by bvaughn · Pull Request #14370 · facebook/react
Use Puppeteer to automate fixtures testing against upcoming releases. (At the moment, I'm only testing two fixtures– packaging and scheduler– but we could add more pretty easily!)
If we wanted ...
If we wanted ...
⏳ Fixed Scheduler setTimeout Fallback
An issue in the Scheduler package caused useEffect to be broken in React Native with JavaScript Core.
https://github.com/facebook/react/pull/14358
An issue in the Scheduler package caused useEffect to be broken in React Native with JavaScript Core.
https://github.com/facebook/react/pull/14358
GitHub
Fixed scheduler setTimeout fallback by bvaughn · Pull Request #14358 · facebook/react
Resolves #14352 (and facebook/react-native/issues/21967)
Restores a working setTimeout based fallback for the scheduler package.
Relocates test-specific code into a new NPM package, jest-mock-sche...
Restores a working setTimeout based fallback for the scheduler package.
Relocates test-specific code into a new NPM package, jest-mock-sche...
🛥 Avoid a V8 Performance Cliff When Profiling
Thanks to the help of V8 team members, the React team was able to find and fix a significant performance cliff during the commit phase when the React profiler is enabled.
https://github.com/facebook/react/pull/14383
Thanks to the help of V8 team members, the React team was able to find and fix a significant performance cliff during the commit phase when the React profiler is enabled.
https://github.com/facebook/react/pull/14383
GitHub
Prevent a v8 deopt when profiling by bvaughn · Pull Request #14383 · facebook/react
Resolves #14365
📌 Enable Hooks In Fabric
Fabric is the ongoing large-scale architectural rewrite of React Native. You can learn more about it in the State of React Native 2018 blog post.
https://github.com/facebook/react/pull/14301
Fabric is the ongoing large-scale architectural rewrite of React Native. You can learn more about it in the State of React Native 2018 blog post.
https://github.com/facebook/react/pull/14301
GitHub
Enable hooks in fabric by sahrens · Pull Request #14301 · facebook/react
because hooks are awesome.
🚸 RFC: Fragment Refs
Fragment refs are presented as an alternative to findDOMNode(). They would allow you to receive an array of DOM nodes rendered by children.
https://github.com/reactjs/rfcs/pull/97
Fragment refs are presented as an alternative to findDOMNode(). They would allow you to receive an array of DOM nodes rendered by children.
https://github.com/reactjs/rfcs/pull/97
GitHub
Fragment refs RFC by sebmarkbage · Pull Request #97 · reactjs/rfcs
Summary
This is an alternative to findDOMNode.
Basic example
function Foo({children}) {
let fragmentRef = useRef();
useEffect(() => {
let domNodes = fragmentRef.current;
// ...
...
This is an alternative to findDOMNode.
Basic example
function Foo({children}) {
let fragmentRef = useRef();
useEffect(() => {
let domNodes = fragmentRef.current;
// ...
...
🗂 RFC: Custom Host Node
Custom Host Nodes are an alternative to the useMutationEffect() API that was originally part of the hooks RFC but got removed later on.
https://github.com/reactjs/rfcs/pull/96
Custom Host Nodes are an alternative to the useMutationEffect() API that was originally part of the hooks RFC but got removed later on.
https://github.com/reactjs/rfcs/pull/96
GitHub
Custom Host Node RFC by sebmarkbage · Pull Request #96 · reactjs/rfcs
This is just an idea and not likely to land any time soon.
Summary
This is an alternative idea to useMutationEffect that was originally part of the hooks RFC but since removed.
Basic example
import...
Summary
This is an alternative idea to useMutationEffect that was originally part of the hooks RFC but since removed.
Basic example
import...