📝 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...
💬 Discussion: Provide Ways to Bail out Inside Hooks
Some use cases require function components with hooks to bail out early. The discussion gives insights into when this is needed. Make sure to check out Sebastian’s latest response on this topic.
https://github.com/facebook/react/issues/14110
Some use cases require function components with hooks to bail out early. The discussion gives insights into when this is needed. Make sure to check out Sebastian’s latest response on this topic.
https://github.com/facebook/react/issues/14110
GitHub
Provide more ways to bail out inside Hooks · Issue #14110 · facebook/react
There's a few separate issues but I wanted to file an issue to track them in general: useState doesn't offer a way to bail out of rendering once an update is being processed. This gets a bi...
📌 Mention Hooks As Accepted on the Website
The React Hooks RFC has recently been merged. Thanks to Jamie (jamiebuilds), the website is now updated to reflect this as well.
https://github.com/reactjs/reactjs.org/pull/1485
The React Hooks RFC has recently been merged. Thanks to Jamie (jamiebuilds), the website is now updated to reflect this as well.
https://github.com/reactjs/reactjs.org/pull/1485
🔎 Add <Suspense> and lazy() to react-is
Pleun Vanderbauwhede (pleunv) added support for <Suspense> and lazy() to react-is. This package is used to test for particular React element types.
https://github.com/facebook/react/pull/14423
Pleun Vanderbauwhede (pleunv) added support for <Suspense> and lazy() to react-is. This package is used to test for particular React element types.
https://github.com/facebook/react/pull/14423
GitHub
Add support for Suspense & lazy() to the react-is package by pleunv · Pull Request #14423 · facebook/react
The "react-is" package appears to lack checks for React.Suspense & React.lazy(). Since libraries like enzyme depend on this to implement proper support for these element types I figur...
💉 Inject overrideProps() into DevTools
Development builds are now exposing a new function to the DevTools which is required to allow editing props of more component types.
https://github.com/facebook/react/pull/14427
Development builds are now exposing a new function to the DevTools which is required to allow editing props of more component types.
https://github.com/facebook/react/pull/14427
GitHub
Inject overrideProps() fn to DevTools by bvaughn · Pull Request #14427 · facebook/react
This function will enable editing props for function components, host nodes, and special types like memo and forwardRef.
Copying the update logic into React will also enable us to add more complex ...
Copying the update logic into React will also enable us to add more complex ...
🎉 React 16.7 Release
No, This Is Not The One With Hooks, but this release contains non-trivial changes to fix various performance issues. Read the accompanying release blog post for more details.
https://reactjs.org/blog/2018/12/19/react-v-16-7.html
No, This Is Not The One With Hooks, but this release contains non-trivial changes to fix various performance issues. Read the accompanying release blog post for more details.
https://reactjs.org/blog/2018/12/19/react-v-16-7.html
📋 Memoize Promise Listeners
Previously, React attached new listeners whenever a promise was thrown. This was causing special headaches in non-concurrent mode, where React re-renders immediately after a promise is thrown, causing exponential growth of promise listeners.
https://github.com/facebook/react/pull/14429
Previously, React attached new listeners whenever a promise was thrown. This was causing special headaches in non-concurrent mode, where React re-renders immediately after a promise is thrown, causing exponential growth of promise listeners.
https://github.com/facebook/react/pull/14429
🛠 DevTools: Support Editable Props for More Component Types
In the upcoming DevTools release, you’ll be able to edit the props of more component types including function components, host elements, and special types like context providers, memo, and forwardRef. Check out the pre-release build.
https://github.com/facebook/react-devtools/pull/1249
In the upcoming DevTools release, you’ll be able to edit the props of more component types including function components, host elements, and special types like context providers, memo, and forwardRef. Check out the pre-release build.
https://github.com/facebook/react-devtools/pull/1249
📌 WIP: Support Hooks in DevTools
Support for Hooks in DevTools allows you to inspect useState state values, useCallback functions, and even deeply nested custom hooks.
While the core team is getting hooks ready for a stable release, this work in progress pull request gives an early glimpse of the new DevTools integration.
https://github.com/facebook/react-devtools/pull/1272
Support for Hooks in DevTools allows you to inspect useState state values, useCallback functions, and even deeply nested custom hooks.
While the core team is getting hooks ready for a stable release, this work in progress pull request gives an early glimpse of the new DevTools integration.
https://github.com/facebook/react-devtools/pull/1272
➡️ Rename
The hook to customize the instance value that is exposed to parent components when using
https://github.com/facebook/react/pull/14565
useImperativeMethods to useImperativeHandleThe hook to customize the instance value that is exposed to parent components when using
ref is now called useImperativeHandle.https://github.com/facebook/react/pull/14565