Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: facebook/react
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7d1fed5128cadbf30dd2ca822b67753f8474209f
Choose a base ref
..
head repository: facebook/react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b64acb1495435c549aebb966b1a87e9d6556738e
Choose a head ref
Showing with 2 additions and 2 deletions.
  1. +2 −2 packages/react-dom/src/client/ReactDOMRoot.js
4 changes: 2 additions & 2 deletions packages/react-dom/src/client/ReactDOMRoot.js
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function
children: ReactNodeList,
): void {
if (__DEV__) {
if (arguments.length > 1 && typeof arguments[1] === 'function') {
if (typeof arguments[1] === 'function') {
console.error(
'render(...): does not support the second callback argument. ' +
'To execute a side effect after rendering, declare it in a component body with useEffect().',
@@ -77,7 +77,7 @@ ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function

ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function(): void {
if (__DEV__) {
if (arguments.length > 0 && typeof arguments[0] === 'function') {
if (typeof arguments[0] === 'function') {
console.error(
'unmount(...): does not support a callback argument. ' +
'To execute a side effect after rendering, declare it in a component body with useEffect().',