status
stringclasses 1
value | repo_name
stringlengths 9
24
| repo_url
stringlengths 28
43
| issue_id
int64 1
104k
| updated_files
stringlengths 8
1.76k
| title
stringlengths 4
369
| body
stringlengths 0
254k
⌀ | issue_url
stringlengths 37
56
| pull_url
stringlengths 37
54
| before_fix_sha
stringlengths 40
40
| after_fix_sha
stringlengths 40
40
| report_datetime
timestamp[ns, tz=UTC] | language
stringclasses 5
values | commit_datetime
timestamp[us, tz=UTC] |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,749 |
["packages/react-devtools-extensions/src/utils.js"]
|
DevTools: Show Source should point to `render`, not `constructor`
|
**Do you want to request a *feature* or report a *bug*?**
Bug. Regression to be more concrete - https://github.com/facebook/react-devtools/pull/1191
**What is the current behavior?**
Show Source points to a Function Component body, and Class Component constructor.
**What is the expected behavior?**
In both cases, you should see "render" methods, class constructor is never something you might want to jump straight into. It was working in this expected way in a previous version of Dev Tools.
**Why this is an issue?**
Well, until React-Hot-Loader is not 100% deprecated, "Show Source" would not work at all, as long as it (and not only it - `mobx` would do the same) is wrapping class constructor, however keeping `render` untouched.
|
https://github.com/facebook/react/issues/16749
|
https://github.com/facebook/react/pull/16759
|
35a202d0e7d7c4ef3c0768cb85ac5e17b6eb03b3
|
ba932a5ad953d7cb36bca273cfeab7eac5700f82
| 2019-09-11T11:00:12Z |
javascript
| 2019-09-12T15:32:42Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,734 |
["packages/shared/invokeGuardedCallbackImpl.js"]
|
window.print() crashes if a 'print' event listener causes a rerender (Chrome, DEV-mode only)
|
**Do you want to request a *feature* or report a *bug*?**
Report a bug.
**What is the current behavior?**
Programmatically calling window.print() can cause React to report strange errors before crashing under certain circumstances. The trigger *seems to be* a call to print() that results in a React state change somewhere (which, in Chrome, seems to happen because the print preview it shows can cause media query events, which can be hooked up to calls to a setState function). This does not always happen, however--as shown in the example if the code is not called from in a setTimeout it doesn't seem to crash. In addition, if the user initiates printing instead (e.g. via CTRL+P), React never crashes.
The two errors I've seen happen as a result of this are `Failed to execute 'handleEvent' on 'EventListener': The provided callback is no longer runnable` (needs "Pause on caught exceptions" in Chrome's DevTools to catch), and after a few of those they're followed by `Maximum update depth exceeded` (even though the setState function is only called once). Once this happens, there's a good chance the tab become completely unresponsive after the print dialog is closed.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.**
A minimal example can be found here: https://codesandbox.io/s/immutable-snowflake-06cj2 . There are no external dependencies. The code is commented with instructions to reproduce the behavior.
I've also included a copy of the code here for completeness' sake:
```jsx
import React from "react";
import ReactDOM from "react-dom";
// Custom hook to match media queries.
// The setMatch call in this function is at the bottom of the error stack.
function useMediaQuery(query) {
const [match, setMatch] = React.useState(() => window.matchMedia(query).matches);
React.useEffect(() => {
const queryList = window.matchMedia(query);
/*************************************************************/
/* If this function is not called, the crash does not occur. */
/* When window.print is called, this effect is run as a */
/* consequence. However React handles it causes errors and */
/* other strange behavior. Because Firefox handles printing */
/* differently, it does not crash. */
/* While this is an example of using setState in useEffect, */
/* it is only run once before the error is thrown anyway. */
/*************************************************************/
const handleMatch = () => setMatch(queryList.matches);
handleMatch();
// Bookkeeping, not relevant to the crash.
queryList.addListener(handleMatch);
return () => queryList.removeListener(handleMatch);
}, [query]);
return match;
}
export function App() {
// This is the simplist media query that will cause a crash
// But anything will work as long as it's different during printing.
// For example, "(max-width: 1260px)" also works if the window
// is wide enough.
let isPrint = useMediaQuery("print");
return (
<div>
<p style={{ fontWeight: 'bold' }}>Important: Only Chrome crashes; Firefox (and likely others) are safe.</p>
<p>(You may need to open this page in its own window instead of the Code Sandbox split-screen.)</p>
<button onClick={() => setTimeout(window.print, 100)}>Crashes</button>
<button onClick={asyncPrint}>Crashes</button>
<button onClick={() => window.print()}>Does not crash</button>
<button onClick={syncPrint}>Does not crash</button>
<p>(Note that pressing CTRL+P never crashes)</p>
<p>If you click the button to call window.print(), React will behave strangely. Once the print preview is about to show, suddenly an error <code>"Failed to execute 'handleEvent' on 'EventListener': The provided callback is no longer runnable"</code> will be thrown. After that happens a few times, a <code>"Maximum update depth exceeded"</code> error will be thrown, even though the setState function is only called once.</p>
<p>(Printing with CTRL+P won't crash, clicking the button to print will)</p>
</div>
);
}
function syncPrint() { window.print(); }
function asyncPrint() { setTimeout(window.print, 100); }
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
```
**What is the expected behavior?**
React should not throw errors after calling window.print(), even if doing so causes state changes.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
This is the latest release (16.9.0). I am unsure if other versions of React are affected.
The behavior was tested using Chrome 76 on Windows 10. This behavior _will not happen_ in Firefox and likely other browsers as well, probably due to the unique way Chrome handles printing and print previews.
|
https://github.com/facebook/react/issues/16734
|
https://github.com/facebook/react/pull/19220
|
8bff8987e513486bb96018b80d7edb02d095ed06
|
f918b0eb41e0eabb8e4dc2bcd20fb8a25654d68f
| 2019-09-10T17:05:25Z |
javascript
| 2020-07-01T14:33:29Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,722 |
["packages/react-devtools-shared/src/backend/renderer.js"]
|
memo name is Anonymous when passed the result of forwardRef
|
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
Consider the following code:
```js
const forwardRefComponentLike = function forwardRefComponentLike(_props, _ref) {
return <span>FowardRef</span>;
};
const FowardRefComponent = React.forwardRef(forwardRefComponentLike, {});
const MemoOfFowardRefComponent = React.memo(FowardRefComponent);
```
The `MemoOfFowardRefComponent` component does not pick up the name of the ForwardRefComponent and is instead rendered in devtools as:
```
Anonymous [Memo]
forwardRefComponentLike [ForwardRef]
```
<img width="262" alt="Screen Shot 2019-09-09 at 10 45 02 PM" src="https://user-images.githubusercontent.com/227292/64587241-81816d00-d353-11e9-8f20-873aa00f5076.png">
See this codesandbox for a demo and a comparison of how React.memo handles regular functional components: https://codesandbox.io/s/react-forwardref-and-memo-combo-33vx7
**What is the expected behavior?**
I would expect this to pick up the name of the thing passed into React.Memo, as happens for regular components
```
forwardRefComponentLike [Memo]
```
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Tested with React 16.9.0.
|
https://github.com/facebook/react/issues/16722
|
https://github.com/facebook/react/pull/17274
|
053cf0fedc91a1507080afe43d3be354ec346e9e
|
4f02c93c7cb213355b3c7d2011e531431d1c6dd8
| 2019-09-10T05:50:12Z |
javascript
| 2019-11-05T22:08:01Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,691 |
["packages/react-devtools-shared/src/hydration.js", "packages/react-devtools-shared/src/utils.js"]
|
DevTools: Failed to execute 'postMessage' on 'Window': #<HTMLAllCollection> could not be cloned.
|
**Do you want to request a *feature* or report a *bug*?**
Report a bug.
**What is the current behavior?**
New dev tools are working fine. But I have a particular component that, when it mounts, the dev tools no longer can inspect anything about it. When I select it, the right hand side just says "Loading..." and nothing ever loads.

As you can see from the gif above, before I click on that particular component that seems to break, I have no errors in my console. But as soon as I click on the component that breaks (or any of its children) the number of console errors goes up by one.
The error in the console looks like this:

```
backend.js:1 Uncaught DOMException: Failed to execute 'postMessage' on 'Window': #<HTMLAllCollection> could not be cloned.
at Object.send (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/backend.js:1:94424)
at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/backend.js:9:5785
```
Hard to provide steps to reproduce this since it's a custom component with business-specific logic (so can't provide the code). But I tried google-ing this problem and error and nothing showed up. So figured posting it here might help if others out there on the interwebs are having the same issue and they can comment here.
**What is the expected behavior?**
Inspecting any mounted component will work.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Currently on react/react-dom 16.3 and the previous dev tools worked just fine. I could inspect any component and see it's data. But the [latestest update](https://reactjs.org/blog/2019/08/15/new-react-devtools.html) broke that.
|
https://github.com/facebook/react/issues/16691
|
https://github.com/facebook/react/pull/19619
|
d6e433899f387be42a3cec2115b4607f32910a3b
|
49af88991c3a3e79e663e495458fad12d3162894
| 2019-09-06T22:12:51Z |
javascript
| 2020-08-21T13:31:16Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,686 |
["packages/react-refresh/src/ReactFreshBabelPlugin.js", "packages/react-refresh/src/__tests__/ReactFreshBabelPlugin-test.js", "packages/react-refresh/src/__tests__/__snapshots__/ReactFreshBabelPlugin-test.js.snap"]
|
Compile error `react-refresh/babel` 0.4.0
|
Using `react-refresh/babel` 0.4.0 is giving me this error on a large number of files:
```
ERROR in ../orbit-app/src/hooks/useStores.ts
Module build failed (from ../node_modules/babel-loader/lib/index.js):
TypeError: Cannot read property '0' of undefined
at Function.get (/Users/nw/projects/motion/orbit/node_modules/@babel/traverse/lib/path/index.js:115:33)
at NodePath.unshiftContainer (/Users/nw/projects/motion/orbit/node_modules/@babel/traverse/lib/path/modification.js:191:31)
at PluginPass.exit (/Users/nw/projects/motion/orbit/node_modules/react-refresh/cjs/react-refresh-babel.development.js:546:28)
```
I narrowed down that file to the simplest thing that causes it:
```
import { useContext } from 'react'
export default () => useContext()
```
_Originally posted by @natew in https://github.com/facebook/react/issues/16604#issuecomment-528708174_
|
https://github.com/facebook/react/issues/16686
|
https://github.com/facebook/react/pull/16687
|
21d79ce04066ade1098a7ae8990e596e01332a65
|
9044bb0fa3c60ffe723034486b02168bdf63f786
| 2019-09-06T16:55:45Z |
javascript
| 2019-09-06T18:58:07Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,685 |
["packages/react-devtools-shared/src/__tests__/utils-test.js", "packages/react-devtools-shared/src/utils.js"]
|
Doesn't support profiler even with latest React version
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
The profiler tab only shows this message even though I have a version greater than 16.5.

Something strange on the console is this message and just appears when the extension is active.

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
React **16.9.0**
React DevTools **4.0.6-a39d9c3**
|
https://github.com/facebook/react/issues/16685
|
https://github.com/facebook/react/pull/16798
|
70dcdd265d0d930c0d0e3666ca973dc455100f6b
|
d1c25558614164936bb90b6c6dc590106381c446
| 2019-09-06T16:42:07Z |
javascript
| 2019-09-17T20:17:04Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,679 |
["packages/react-devtools-shared/src/__tests__/inspectedElementContext-test.js", "packages/react-devtools-shared/src/backend/legacy/renderer.js", "packages/react-devtools-shared/src/backend/renderer.js", "packages/react-devtools-shared/src/backend/types.js", "packages/react-devtools-shared/src/devtools/views/Components/InspectedElementContext.js", "packages/react-devtools-shared/src/devtools/views/Components/SelectedElement.js", "packages/react-devtools-shared/src/devtools/views/Components/types.js"]
|
DevTools: Uninitialized context is displayed as an empty object
|
When inspecting a component that is missing `context` it is displayed as an empty object, meanwhile if the `state` is not initialized it is not displayed at all, for no `props` it is displayed the string `None`. In my humble opinion it is misleading that no context is displayed as an empty object.
|
https://github.com/facebook/react/issues/16679
|
https://github.com/facebook/react/pull/16617
|
c317fc273b6fbe03e30971f7dd5690e540f6a029
|
4ef6387d6e79e87c3ebc11a53847fd26ad5e71d9
| 2019-09-06T09:18:19Z |
javascript
| 2019-09-10T20:30:20Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,585 |
["packages/shared/invokeGuardedCallbackImpl.js"]
|
useState's setState hangs when called in closed window
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
If useState's setState is called in a closed window, it hangs the browser (at least Chrome). I agree that this seems like a weird issue, but we do this all of the time in our plugin we've built for an application that has iframe based UI.
This reproduces it. Just click "Do it". Note that your codesandbox service worker will spin up to 100% cpu and I can't figure out a way to stop it other than to kill that task in the Chrome task manager
https://codesandbox.io/s/react-setstate-on-hidden-window-hangs-repro-cixqn
**What is the expected behavior?**
No hang, it should just ignore the setState call, ideally.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
16.9. I'm not sure, but hooks are fairly new. This reproduces in Chrome 76, but not Firefox as far as I can tell.
|
https://github.com/facebook/react/issues/16585
|
https://github.com/facebook/react/pull/19220
|
8bff8987e513486bb96018b80d7edb02d095ed06
|
f918b0eb41e0eabb8e4dc2bcd20fb8a25654d68f
| 2019-08-27T14:32:08Z |
javascript
| 2020-07-01T14:33:29Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,527 |
["packages/react-devtools-shared/src/devtools/views/Profiler/ProfilingImportExportButtons.js", "packages/react-devtools-shared/src/devtools/views/utils.js"]
|
DevTools: Profiler: Save profile does nothing on Firefox
|
Hi, long time user, first time issuer.
I think I found a bug with the Profiler component. When I click on the `Save profile...` button at the top nothing happens and there appears to be no new files in my Downloads folder. I think it might be silently failing and that's why I am not getting any response. Has anyone else ran into this issue?
Another thing I would like to mention is that I haven't looked through all of the documentation material about the new Profiler. I only read [this introductory blog post](https://reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html), so if this issue is addressed elsewhere I apologize and also request the source to that solution.
Thank you for your time!
**Versions:**
* `React DevTools 4.0.5`
* `Firefox: 68.0.2(64-bit)`
* `Ubuntu: 18.04`
|
https://github.com/facebook/react/issues/16527
|
https://github.com/facebook/react/pull/16612
|
92f094d86d22afa77407a693681d7725e2540225
|
77bb1023986225a12aaa1b45b85703df5deaf95a
| 2019-08-21T18:04:11Z |
javascript
| 2019-09-03T15:35:12Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,501 |
["packages/react-devtools-shared/src/backend/renderer.js"]
|
Getting maximum call stack exceeded on backend.js when rendering many elements.
|
## Details
Using version 4.0.2 (8/15/2019) I am getting a maximum call stack size exceeded when my app starts up. While my app using this is a little different I have replicated the issue using a fresh create-react-app. I will include the App.js code below.
## Steps to reproduce
1. Create a new app using version 3.0.1 of create-react-app
2. Replace the code in App.js with the code listed below
3. Inspect the console, there should be a stack trace from a maximum call stack exceeded error
## App.js
```
import React from 'react';
import logo from './logo.svg';
import './App.css';
const createDivs = num => {
const rtn = [];
for(let i = 0; i < num; i++) {
const key = `div-${i}`;
rtn.push(<div className={key} key={key} />)
}
return rtn;
}
function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
<div>
{createDivs(15000)}
</div>
</div>
);
}
export default App;
```
## Call Stack
<details>
<summary>backend.js:formatted:2097 Uncaught RangeError: Maximum call stack size exceeded
</summary>
```
at ge (backend.js:formatted:2097)
at Ge (backend.js:formatted:2435)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
at Ge (backend.js:formatted:2478)
ge @ backend.js:formatted:2097
Ge @ backend.js:formatted:2435
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
Ge @ backend.js:formatted:2478
postMessage (async)
r @ contentScript.js:1
88 @ contentScript.js:1
n @ contentScript.js:1
(anonymous) @ contentScript.js:1
(anonymous) @ contentScript.js:1
Show 170 more frames
```
</details>
This was not an issue in the previous version of react-devtools.
|
https://github.com/facebook/react/issues/16501
|
https://github.com/facebook/react/pull/21377
|
a5267faad5849eb3d10ead6be911f661691e0345
|
a0d6b155dc3a182162b9f91baac33df39d7919df
| 2019-08-20T02:40:23Z |
javascript
| 2021-04-28T14:29:22Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,497 |
["packages/react-devtools-shared/src/devtools/views/Components/SelectedElement.css", "packages/react-devtools-shared/src/devtools/views/Components/SelectedElement.js"]
|
DevTools: Show component file path
|
**Do you want to request a *feature* or report a *bug*?**
Feature.
**What is the current behavior?**
The new DevTools doesn't show the component file path as did the v3 version.
**What is the expected behavior?**
It would be great to show the component file path, it's a really important feature when working in a large codebase.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
React DevTools v4 is affected, v3 had it.
|
https://github.com/facebook/react/issues/16497
|
https://github.com/facebook/react/pull/17567
|
e039e690b5c45c458dd4026f3db16bac18ed0e47
|
031a5aaffbc06f0ac115f1d814e43e4d63ae15d2
| 2019-08-19T23:05:12Z |
javascript
| 2019-12-10T17:24:34Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,492 |
["packages/react-devtools-shared/src/devtools/views/Profiler/SnapshotCommitList.js", "packages/react-devtools-shared/src/devtools/views/Profiler/SnapshotCommitListItem.js"]
|
DevTools: Commit picker should register leaving the picker at a side as setting a terminal value
|
Seems non-ideal. Typically range controls handle this case.

---
Originally reported by @gaearon via https://github.com/bvaughn/react-devtools-experimental/issues/141
|
https://github.com/facebook/react/issues/16492
|
https://github.com/facebook/react/pull/18852
|
df14b5bcc163516fc0f1ad35e9b93732c66c1085
|
62077431686a5c276a37f185fc5ebd1e128a7601
| 2019-08-19T22:26:10Z |
javascript
| 2020-05-08T18:19:57Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,475 |
["packages/react-devtools-core/src/standalone.js", "packages/react-devtools-extensions/src/main.js", "packages/react-devtools-shared/src/devtools/views/DevTools.js", "packages/react-devtools-shared/src/devtools/views/ShowWelcomeToTheNewDevToolsDialog.css", "packages/react-devtools-shared/src/devtools/views/ShowWelcomeToTheNewDevToolsDialog.js", "packages/react-devtools-shell/src/devtools.js"]
|
React DevTools: Welcome screen keeps showing up
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
“Welcome to the new React DevTools!” message blocks the devtool panel every time the it is opened.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
1. Open a website with React with DevTools installed.
2. Open the Component tab.
3. Dismiss the welcome screen.
4. Close the devtools and open it again.
**What is the expected behavior?**
Dismissing the “Welcome to the new React DevTools!” message should be permanent.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
DevTools: 4.0.5
Chrome: 77.0.3865.35
|
https://github.com/facebook/react/issues/16475
|
https://github.com/facebook/react/pull/16834
|
924a305780eb71866eb0932027048237b6f5c3cd
|
4ddcb8e1344630a63c10790d8e24e1194a1abdce
| 2019-08-19T21:52:14Z |
javascript
| 2019-09-19T15:41:18Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,473 |
["packages/react-devtools-shared/src/devtools/views/Profiler/SidebarSelectedFiberInfo.js"]
|
DevTools: Switch between "Rendered At" renders using keyboard arrow keys
|
My favorite devtools feature, "Why did this render?", has a remaining problem: it's too hard to flip through a long list of renders in the Rendered At list to find an interesting render. I know I can use the mouse (or Tab and then Space) to move to the next render, but that's painful if there are 50+ renders to work through.
Suggestion: when an item in the Rendered At list has focus, then up/down arrows should change the selected render (and scroll the pane up/down if the selected render isn't visible).
This would be helpful for accessibility too.
I'll file a separate issue for keyboard support for the flamegraph view. Keyboard access to that view will be much harder to implement so it makes sense to do it separately.
---
Originally reported by @justingrant via https://github.com/bvaughn/react-devtools-experimental/issues/332
|
https://github.com/facebook/react/issues/16473
|
https://github.com/facebook/react/pull/18586
|
0c3c27a718579066e08e1b2f5529deb67999e114
|
6c43a62c0ff942329431cee709114b56bcda995f
| 2019-08-19T21:49:37Z |
javascript
| 2020-04-13T20:00:13Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,467 |
["packages/react-devtools-shared/src/__tests__/__snapshots__/store-test.js.snap", "packages/react-devtools-shared/src/__tests__/store-test.js", "packages/react-devtools-shared/src/devtools/utils.js", "packages/react-devtools-shared/src/devtools/views/Components/Badge.js", "packages/react-devtools-shared/src/devtools/views/Components/Element.js", "packages/react-devtools-shared/src/devtools/views/Components/HocBadges.js", "packages/react-devtools-shared/src/utils.js"]
|
DevTools: Improve HOC search UX
|
Building on top of #360
We could probably improve the search UX in a couple of ways:
* Visually indicate when the "match" is because of a HOC name, e.g.
<img width="161" alt="Screen Shot 2019-08-03 at 1 54 21 PM" src="https://user-images.githubusercontent.com/29597/62416804-36f32f00-b5f6-11e9-9150-e32f652c7f98.png">
* Match built-in HOC types (e.g. searching "me" should match `React.memo` HOCs, searching "f" should match `React.forwardRef`, etc.)
---
Originally reported via https://github.com/bvaughn/react-devtools-experimental/issues/365
|
https://github.com/facebook/react/issues/16467
|
https://github.com/facebook/react/pull/18802
|
121af3143c7164a196420b080cb31d0ef07d5dff
|
7c080902ef4ad7b061c0377ee72d0a343cf42ea5
| 2019-08-19T21:40:16Z |
javascript
| 2020-05-15T17:37:34Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,466 |
["packages/react-devtools-shared/src/__tests__/inspectedElementContext-test.js", "packages/react-devtools-shared/src/backend/legacy/renderer.js", "packages/react-devtools-shared/src/backend/renderer.js", "packages/react-devtools-shared/src/backend/types.js", "packages/react-devtools-shared/src/devtools/views/Components/InspectedElementContext.js", "packages/react-devtools-shared/src/devtools/views/Components/SelectedElement.js", "packages/react-devtools-shared/src/devtools/views/Components/types.js"]
|
DevTools: Don't show "context" for classes without either contextType or contextTypes
|
* Don't show "context" for classes without either contextType or contextTypes
* For classes with contextTypes, change the label to "legacy context" instead
---
Originally reported by @gaearon via https://github.com/bvaughn/react-devtools-experimental/issues/368
|
https://github.com/facebook/react/issues/16466
|
https://github.com/facebook/react/pull/16617
|
c317fc273b6fbe03e30971f7dd5690e540f6a029
|
4ef6387d6e79e87c3ebc11a53847fd26ad5e71d9
| 2019-08-19T21:39:10Z |
javascript
| 2019-09-10T20:30:20Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,464 |
["packages/react-devtools-shared/src/devtools/views/Tooltip.css"]
|
DevTools: Tooltips appear to be Times New Roman in Firefox
|
Windows Firefox:

Looks OK in Chrome:

---
Originally reported by @Daniel15 via https://github.com/bvaughn/react-devtools-experimental/issues/382
|
https://github.com/facebook/react/issues/16464
|
https://github.com/facebook/react/pull/16701
|
35f447ddbf652091ce98f102bedc71a054a638f6
|
4905590e1e9f9798804d71da14a45084880edbb4
| 2019-08-19T21:36:44Z |
javascript
| 2019-09-09T23:21:04Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,424 |
["packages/react-devtools/CHANGELOG.md"]
|
New React DevTools can't access immutable.js objects?
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
When the state or props are formed by Immutable.js objects, react devtools cannot expand it nor copy to temporal variable anymore.

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
https://codesandbox.io/s/withered-cherry-h3dfh
**What is the expected behavior?**
Be able to inspect the value of the immutable object or at least, copy it into a temporal variable.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
React 16.8.6
Chrome Version 70.0.3538.77 (Official Build) (64-bit)
|
https://github.com/facebook/react/issues/16424
|
https://github.com/facebook/react/pull/16438
|
c1d3f7f1a97adad9441287a92dcd4ac5d2478c38
|
21e793fb4fce16b938e549de9277a7fdddff40e8
| 2019-08-16T15:42:33Z |
javascript
| 2019-08-17T18:47:38Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,402 |
["fixtures/dom/src/components/fixtures/textareas/index.js", "packages/react-dom/src/__tests__/ReactDOMTextarea-test.js", "packages/react-dom/src/client/ReactDOMTextarea.js"]
|
textarea with `required` attribute renders in invalid state in FF
|
*Bug*
When a `textarea` has the `required` attribute it renders in the invalid state using FireFox.
This behavior is visible here: https://codesandbox.io/s/rough-frog-f00ow. Remember to view it in FireFox.
I expect the required field to validate on form submit and not before.
I have tested this with FireFox 68 and 69 and React 16.8.6
This appears appears to be a re-occurrence of: https://github.com/facebook/react/issues/8395
|
https://github.com/facebook/react/issues/16402
|
https://github.com/facebook/react/pull/16578
|
f818af9b03700f681bad0de6041e404cd681319d
|
a5df18a9e5d7cc70c30ce144dcc291e9f64cb451
| 2019-08-15T14:38:52Z |
javascript
| 2019-09-18T21:38:02Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,396 |
["packages/use-subscription/src/__tests__/useSubscription-test.internal.js", "packages/use-subscription/src/useSubscription.js"]
|
use-subscription causes UI tearing in some random cases
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
Referring to [this twitter conversation](https://twitter.com/milankinen/status/1161718618633248768?s=20), it seems that `use-subscription` can cause "UI tearing" in some random cases due to a (possible) race condition w.r.t. the combination of `subscribe` and `getCurrentValue` in internal usage.
Here is a minimalistic application demonstrating the behaviour: https://github.com/milankinen/use-subscription-tearing-demo
**What is the expected behavior?**
I'd expect counters in the example application to *always* render same number.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Tested React version: 16.9.0 (haven't tested with older ones)
OS: OSX 10.14.6
Hardware: MacBook Pro (Retina, 15-inch, Mid 2015) 2.8 GHz Intel Core i7 & 16GB RAM
Browser: Chrome Version 76.0.3809.100 (Official Build) (64-bit)
@bvaughn
|
https://github.com/facebook/react/issues/16396
|
https://github.com/facebook/react/pull/16623
|
79e46b67784623f42186f69baa233e5854a8408f
|
d96f478f8a79da3125f6842c16efbc2ae8bcd3bf
| 2019-08-14T23:00:03Z |
javascript
| 2019-09-05T18:12:46Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,393 |
["packages/react-dom/src/__tests__/ReactDOMShorthandCSSPropertyCollision-test.js", "packages/shared/ReactFeatureFlags.js", "packages/shared/forks/ReactFeatureFlags.native-fb.js", "packages/shared/forks/ReactFeatureFlags.native-oss.js", "packages/shared/forks/ReactFeatureFlags.persistent.js", "packages/shared/forks/ReactFeatureFlags.test-renderer.js", "packages/shared/forks/ReactFeatureFlags.testing.js", "packages/shared/forks/ReactFeatureFlags.www.js"]
|
Shorthand CSS property collision should trigger a warning
|
I faced a "bug" today that made me spent 1h figuring out what was going on:
I'm using an external component that accepts a `color` prop in order to set the `background-color` of the root element, but this same component also accepts a `background` prop which I wasn't passing, and by default, it was set to `''`.
The result: React didn't throw an error nor a warning, however, the resulting element in the DOM didn't contain either `background-color` or `background`, and since the element had a default `background-color` coming from a CSS class, it took me a while to figure out why the color that I was passing wasn't being applied, and instead it was using the one from the CSS class.
See: https://codesandbox.io/s/react-example-8rxc8
What I reported above was the `static1` case.
I added other cases as a bonus, as when I was playing with this they also seemed weird to me. On `static2` I define the same properties, but because I change the order, it works. On the toggleable ones, initially I can see the background, but after changing it never appears anymore.
I'm not sure if I created those extra "test cases" correctly. My main concern is really around static1 not outputting anything on the console as a warning.
Related issues:
#6348
#8689
I wonder if #14181 (@sophiebits) should have covered this?
|
https://github.com/facebook/react/issues/16393
|
https://github.com/facebook/react/pull/18002
|
e05dedc415171aad65e4263ef861b21e867325f7
|
4f71f25a34db0caa1c9c0b75f1f453f948272e65
| 2019-08-14T20:45:35Z |
javascript
| 2020-02-10T11:42:11Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,376 |
["packages/react-dom/src/events/ReactDOMEventListener.js"]
|
Add Priorities for All Event Types
|
Currently the simple event plugin defines a priority for the event but not all events go through the SimpleEventPlugin. That's just one of several EventPlugins. The remaining ones now get the wrong priority associated with them.
E.g. I think all of these should be discrete:
change
compositionend
compositionstart
compositionupdate
selectionchange
textinput
These show up too but I don't know if they're even bridged.
dblclick
pointerenter
pointerleave
Flare defines its own priorities.
|
https://github.com/facebook/react/issues/16376
|
https://github.com/facebook/react/pull/21077
|
a63f0953be9550ab18bcd48725f77a073549ec69
|
148f8e497c7d37a3c7ab99f01dec2692427272b1
| 2019-08-13T05:27:07Z |
javascript
| 2021-03-24T19:57:17Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,313 |
["packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js", "packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js"]
|
[ESLint]react-hooks/exhaustive-deps rule autofix modifies code function, violating eslint best practices
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
Consider:
```jsx
function Example({ fetchData, someArg }) {
let data = 'defaultValue';
useEffect(() => {
data = fetchData(someArg);
}, [someArg]);
return JSON.stringify(data);
}
```
auto fix will automatically change this to:
```jsx
function Example({ fetchData, someArg }) {
let data = 'defaultValue';
useEffect(() => {
data = fetchData(someArg);
}, [someArg, fetchData]);
return JSON.stringify(data);
}
```
Here we have a simple data fetch component that should refetch data when parameters change, but not when the fetch function changes. Whether this is right or not, it is legitimate code, that the lint fix will cause serious problems in the code if it is used like this:
```jsx
function ExmapleUsage({ fetchData }) {
return <Example fetchData={( arg ) => fetchData('Hello World', arg)} someArg="Goodbye" />
}
```
**What is the expected behavior?**
[Eslint best practices](https://eslint.org/docs/developer-guide/working-with-rules#applying-fixes) say that fix rules should not change functionality of code, so that you can safely run fix and expect no functional changes to be made. This rule directly breaks that. I as a repo maintainer see the auto fix as a greater risk than the problems the lint rule prevents. If autofix was turned off, the rule would be entirely a positive.
Unfortunately, [ESLint also has rejected the idea of disabling autofix for certain rules](https://github.com/eslint/eslint/issues/7549). So not following best practices is not ideal.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Not a React Bug but a lint rule.
|
https://github.com/facebook/react/issues/16313
|
https://github.com/facebook/react/pull/17385
|
9def56ec0e1e71928ee999f48c00b1803ed8772a
|
93a229bab59f94e214256582c55d3b6c1fc2b958
| 2019-08-07T17:37:42Z |
javascript
| 2020-02-17T20:24:27Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,160 |
["packages/react-dom/src/__tests__/CSSPropertyOperations-test.js", "packages/react-dom/src/__tests__/ReactDOMServerIntegrationAttributes-test.js", "packages/react-dom/src/server/ReactPartialRenderer.js", "packages/react-dom/src/shared/CSSPropertyOperations.js"]
|
Bug: React DOM Server is mutating CSS variable names
|
**Do you want to request a *feature* or report a *bug*?**
Bug
### Current Behaviour
- `ReactDOMServer.renderToString` is mutating CSS Variable names that are inlined and in the `--camelCase` format into `--kebab-case`
### Expected Behaviour
- `ReactDOMServer.renderToString` does not mutate the CSS Variable name, and keeps it in `--camelCase` format
### Demo
- https://codesandbox.io/s/react-dom-server-debugging-28xsr
### Versions:
- Issue appears in `[email protected]` & `[email protected]`
- Issue appears in `[email protected]` & `[email protected]`
- (That's all I've tested so far)
### Other notes:
- It's worth noting that `ReactDOM.render` is preserving the CSS Variable name and not mutating it. It only seems to only be an issue with `ReactDOMServer.renderToString`
|
https://github.com/facebook/react/issues/16160
|
https://github.com/facebook/react/pull/16167
|
d412eec8396e9b800b2e75a2585111ffa09b4978
|
858c84206ef79f210e552c0128f01d1ae3a0cbf0
| 2019-07-18T22:38:21Z |
javascript
| 2019-07-26T17:06:24Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,109 |
["packages/scheduler/src/forks/SchedulerHostConfig.default.js"]
|
Consider using reactjs.org instead of fb.me in react's error/warning messages
|
Hi,
Facebook is blocked in my country (and I think in some other countries) and links like `https://fb.me/react-invalid-hook-call` are blocked for me, in order to see the related documentation of the link I have to use VPN. so if is possible please use another link shortener service or point to `reactjs.org` directly.
Thanks.
|
https://github.com/facebook/react/issues/16109
|
https://github.com/facebook/react/pull/19830
|
16fb2b6f9e8fb17e2c468384e870cab635e4b1bb
|
36df9185c53ce4e90dc1f7362f74533ecf0607db
| 2019-07-11T12:18:34Z |
javascript
| 2020-09-16T12:07:16Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 16,003 |
["packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js", "packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js"]
|
[eslint-plugin-react-hooks] Crash when referencing "arguments"
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Report a bug
**What is the current behavior?**
Referencing `arguments` from inside an arrow function (i.e. the `arguments` from the nearest non-arrow function) causes a crash in the eslint plugin.
```
TypeError: Cannot read property 'type' of undefined
Occurred while linting /.../src/react.tsx:92
at gatherDependenciesRecursively (.../node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js:1032:21)
at visitFunctionExpression (.../node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js:985:7)
at .../node_modules/eslint/lib/util/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
at Object.emit (.../node_modules/eslint/lib/util/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (.../node_modules/eslint/lib/util/node-event-generator.js:251:26)
at NodeEventGenerator.applySelectors (.../node_modules/eslint/lib/util/node-event-generator.js:280:22)
at NodeEventGenerator.enterNode (.../node_modules/eslint/lib/util/node-event-generator.js:294:14)
at CodePathAnalyzer.enterNode (.../node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:632:23)
at .../node_modules/eslint/lib/linter.js:752:32
```
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
This doesn't reproduce in codesandbox as CRA hasn't been updated yet.
This snippet is enough to cause the crash:
```js
function useMyHook(/*...*/) {
useEffect(() => {
arguments // crash because reference.resolved.defs is empty
}, [])
}
```
This, however, does not crash:
```js
function useMyHook(/*...*/) {
useEffect(function() {
arguments // ok
return () => arguments // also ok
}, [])
}
```
It is possible this depends on using the `@typescript-eslint/parser` parser; but I think scope analysis is run internally by `eslint` so it shouldn't matter.
**What is the expected behavior?**
No crash
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
`[email protected]`, `react-hooks/exhaustive-deps` rule
|
https://github.com/facebook/react/issues/16003
|
https://github.com/facebook/react/pull/16356
|
e308a037beb6df9851d997ef1c8ea9de103b6adb
|
9e64bf18e11828d6b4c0363bff5ed2eca1ccd838
| 2019-06-27T02:06:47Z |
javascript
| 2019-08-14T13:44:06Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 15,978 |
["packages/react-dom/src/client/ReactDOMComponent.js", "packages/react-dom/src/client/__tests__/trustedTypes-test.internal.js"]
|
Using 'scRipt' in React.createElement's type parameter allows you to execute JavaScript code in the child parameter
|
**Do you want to request a feature or report a bug?**
Report a bug
**What is the current behavior?**
It's possible to execute JavaScript code written in the child parameter of the `React.createElement` function, if the type parameter consists of a string with mixed casing, like so:
```javascript
React.createElement('scRipt', null, 'alert(1)');
```
https://codesandbox.io/s/sleepy-hodgkin-twxqe
**What is the expected behavior?**
It should not execute the code, but behave exactly like if you typed in 'script' in lowercase.
I would argue that this is unexpected behavior. Judging from the docs (["JSX Prevents Injection Attacks"](https://reactjs.org/docs/introducing-jsx.html#jsx-prevents-injection-attacks)) developers might get the impression, that it is generally safe to embed any user input using JSX. Additionally, if you try to execute JavaScript using script tags, it won't work.
I _think_ developers might get the idea to give users the ability to write their own "safe" HTML code in comments and the like by parsing their input and converting it to React elements. JSX also allows you to use dynamic input as tag types.
Apart from the mentioned behavior, I'm not aware of any other `type` / `children` combination that would result in JavaScript code execution without a controllable props parameter. So a scenario where a user can control both of these parameters is most likely the only one where this leads to issues.
So I think the code below is likely the culprit (line 423). Please correct me if I'm wrong.
https://github.com/facebook/react/blob/fce15f14d38d680f3bdee3a124e9e94e91520e16/packages/react-dom/src/client/ReactDOMComponent.js#L423-L430
Imo it would make sense to convert the `type` variable to lowercase before comparing it to the 'script' string, so it works as anticipated, even if the casing of the input is user-controllable. Unfortunately I'm not familiar enough with the inner workings of React to submit a pull request of which I'm confident, that it doesn't break anything. This would be my naive solution for this issue:
```javascript
if (typeof type === 'string' && type.toLowerCase() === 'script') { /* ... */ }
```
I'd love to hear your thoughts on this. Is this behavior actually unexpected and if so, should it be fixed?
|
https://github.com/facebook/react/issues/15978
|
https://github.com/facebook/react/pull/18660
|
9025949d840c89619bed9bf06f5c14c25c141c5a
|
e5cc1462b3e7be78306a1f6961ce82d942eb36d2
| 2019-06-24T19:56:15Z |
javascript
| 2020-04-21T19:10:25Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 15,971 |
["packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js", "packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js", "packages/eslint-plugin-react-hooks/package.json"]
|
[eslint-plugin-react-hooks] Compatibility with ESLint 6.0.0
|
**Do you want to request a *feature* or report a *bug*?**
feature
**What is the current behavior?**
Using in my `package.json`:
```
"eslint": "^6.0.0",
"eslint-plugin-react-hooks": "^1.6.0",
```
Yarn emits:
```
warning " > [email protected]" has incorrect peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0".
```
**What is the expected behavior?**
No warning.
AFAICT, there shouldn't be other change needed besides updating the peer dependency version in the `package.json`: https://eslint.org/docs/user-guide/migrating-to-6.0.0
so it looks like I could just ignore the warning, but I'd rather be sure the plugin is actually compatible with ESLint 6.0.0
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
n/a
|
https://github.com/facebook/react/issues/15971
|
https://github.com/facebook/react/pull/15974
|
fce15f14d38d680f3bdee3a124e9e94e91520e16
|
7439b48cf4356473e4f1596e47aac34c8345163a
| 2019-06-24T09:54:48Z |
javascript
| 2019-06-24T21:30:12Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 15,613 |
["packages/react-dom/src/__tests__/ReactDOMEventListener-test.js", "packages/react-dom/src/client/ReactDOMComponent.js"]
|
<embed> doesn't trigger onLoad
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug.
**What is the current behavior?**
`<embed>` doesn't trigger `onLoad`
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
https://codesandbox.io/s/9yrqzw71xp
**What is the expected behavior?**
`<embed>` should trigger `onLoad`
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
16.8.6
|
https://github.com/facebook/react/issues/15613
|
https://github.com/facebook/react/pull/15614
|
f961050a376f2a0d1397fb8129ae0e7d4efa9b52
|
4bf88ddeca37d5971c05a9ab720f898409c143fd
| 2019-05-10T12:22:38Z |
javascript
| 2019-05-16T09:05:20Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 15,566 |
["package.json", "packages/react-dom/src/__tests__/ReactTestUtilsAct-test.js", "packages/react-dom/src/__tests__/ReactUpdates-test.js", "packages/react-reconciler/src/ReactFiberScheduler.js"]
|
Batched updates break interaction tracing for mounts
|
This test works:
```js
let interaction;
const onRender = jest.fn();
SchedulerTracing.unstable_trace("initial_event", performance.now(), () => {
const interactions = SchedulerTracing.unstable_getCurrent();
expect(interactions.size).toBe(1);
interaction = Array.from(interactions)[0];
ReactDOM.render(
<React.Profiler id="profiler" onRender={onRender}>
<Text text="Hi" />
</React.Profiler>,
document.createElement("div")
);
});
expect(interaction).toBeDefined();
expect(onRender).toHaveBeenCalledTimes(1);
expect(onRender.mock.calls[0][6]).toContain(interaction);
```
But if you wrap it in `act`, it fails:
```js
let interaction;
const onRender = jest.fn();
TestUtils.act(() => {
SchedulerTracing.unstable_trace("initial_event", performance.now(), () => {
const interactions = SchedulerTracing.unstable_getCurrent();
expect(interactions.size).toBe(1);
interaction = Array.from(interactions)[0];
ReactDOM.render(
<React.Profiler id="profiler" onRender={onRender}>
<Text text="Hi" />
</React.Profiler>,
document.createElement("div")
);
});
expect(interaction).toBeDefined();
expect(onRender).toHaveBeenCalledTimes(1);
expect(onRender.mock.calls[0][6]).toContain(interaction);
});
```
In the latter case, inside of `ReactFiberScheduler`, the interactions `Set` is empty.
https://github.com/facebook/react/blob/2e5d1a8b9e2c29418a27b24306e4c8d5f8681f4f/packages/react-reconciler/src/ReactFiberScheduler.js#L2119-L2126
Note that this does not seem to impact _updates_, only the initial _mount_. I suspect we just need to wrap a callback or something minor.
I came across this while trying to write profiling tests for the new DevTools. (https://github.com/bvaughn/react-devtools-experimental/pull/258)
|
https://github.com/facebook/react/issues/15566
|
https://github.com/facebook/react/pull/15567
|
d38cfd452f014167d223c73091d4a148a9f893a5
|
6da04b5d886b272e241178694e15ced22c5a2c05
| 2019-05-04T21:06:37Z |
javascript
| 2019-05-06T19:59:48Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 15,510 |
["packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js", "packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js"]
|
[ESLint] Assignment like foo.bar.baz = X should warn about foo.bar instead
|
```js
let foo = {}
useEffect(() => {
foo.bar.baz = 43;
}, []);
```
This asks you to include `foo.bar.baz` into deps. But this doesn't make sense, as you write to it. Instead it should ask to include `foo.bar` into array.
If `foo` is a newly created object in render scope then we might additionally nudge you to `useRef` for it instead. Because otherwise it won't be shared between renders.
|
https://github.com/facebook/react/issues/15510
|
https://github.com/facebook/react/pull/16784
|
f625fce8578cc77113d9da8ffd02032a60477e6a
|
2ff27ec1128fca8defb71d912e501647cf58f6f8
| 2019-04-26T12:27:09Z |
javascript
| 2020-04-04T13:26:39Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 15,333 |
["fixtures/attribute-behavior/src/attributes.js", "packages/react-dom/src/shared/DOMProperty.js", "packages/react-dom/src/shared/possibleStandardNames.js"]
|
Support HTML5 Video Attribute disablePictureInPicture
|
Bug Report: `disablePictureInPicture` for html5 video elements are not supported
Eg:
```
<video
src="https://www.w3schools.com/tags/movie.mp4"
disablePictureInPicture
loop
controls
controlsList="nodownload"
></video>
```
**What is the current behavior?**
Should remove the 3 dots (more button) on videos on Chrome:

**What is the expected behavior?**
Instead, the attribute is not taken into consideration so the more menu stays:

Example:
https://jsfiddle.net/r1w4x7m0/2/
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
All / Latest, Chrome Browsers, All OSes.
Pull request for this issue has also been submitted: #15334
|
https://github.com/facebook/react/issues/15333
|
https://github.com/facebook/react/pull/15334
|
1eb2b892dfffedfdb57039ef715fc7049f4d538a
|
f85aadefc0c059648ee53842ba948a7d7cba468b
| 2019-04-05T08:38:08Z |
javascript
| 2019-04-25T11:02:27Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 15,301 |
["packages/react-dom/src/__tests__/ReactErrorBoundariesHooks-test.internal.js"]
|
renderWithHooks may initialize workInProgressHook at the beginning
|
**Do you want to request a *feature* or report a *bug*?**
bug
**What is the current behavior?**
example here https://codesandbox.io/s/34mvmoln65
Based on issue #15219 I found the reason of this issue is that, when `ErrorThrower` throws `renderWithHooks` just break down and keep `workInProgressHook` stay `useMemo`. Because of the `componentDidCatch` in `ErrorHandler` we can go on the render phase. But when we reach the `StatefulComponent` we got `useMemo` as `workInProgressHook` and it make `StatefulComponent` with first hook `useMemo`.
I guess we can fix this just set `workInProgressHook` to null at the beginning of `renderWithHooks`. I post this issue because I see this comment in `renderWithHooks`, based on this example, all this variables may also not be reset when start `renderWithHooks`, so maybe it's better to put them back?
```js
// The following should have already been reset
// currentHook = null;
// workInProgressHook = null;
// remainingExpirationTime = NoWork;
// componentUpdateQueue = null;
// didScheduleRenderPhaseUpdate = false;
// renderPhaseUpdates = null;
// numberOfReRenders = 0;
// sideEffectTag = 0;
```
If no other concerns about this, I just want to put them back to fix this issue.
|
https://github.com/facebook/react/issues/15301
|
https://github.com/facebook/react/pull/20002
|
f668b6c351c2654fef43e5f1ec24fd72a899d219
|
b093528650db32b0112eb3adfcf9867e5f3b56d0
| 2019-04-03T02:47:52Z |
javascript
| 2020-10-16T15:07:27Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 15,219 |
["packages/react-dom/src/__tests__/ReactErrorBoundariesHooks-test.internal.js"]
|
Combination of componentDidCatch and hooks throws "Should have a queue. This is likely a bug in React."
|
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
If a component with hooks throws an error in its render function *after* the hooks have been defined, and that render error is caught via a `componentDidCatch` in a parent component, any subsequent components will have their hook order jumbled up on the next render.
This results in the app crashing with an **"Uncaught Invariant Violation: Should have a queue. This is likely a bug in React. Please file an issue."** error (or different messages depending on the specific hooks used)
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
https://codesandbox.io/s/34mvmoln65
(once loaded, open the dev tools console and click the 'Trigger re-render' button)
Relevant source:
```jsx
function App(props) {
const [, setCounter] = React.useState(0);
return (
<div>
<ErrorHandler>
<ErrorThrower />
</ErrorHandler>
<StatefulComponent />
<button onClick={() => setCounter(value => value + 1)}>
Trigger re-render
</button>
</div>
);
}
function ErrorThrower() {
React.useMemo(() => undefined, []);
if (true) {
throw new Error("!!!");
}
return <p>[Error component]</p>;
}
function StatefulComponent() {
React.useState(null);
return <p>[Stateful component]</p>;
}
class ErrorHandler extends React.Component {
...
componentDidCatch(error) {
...
}
}
```
**What is the expected behavior?**
The app should not crash, seeing as the `componentDidCatch()` ought to catch the render error and allow the rest of the app to render as normal
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
This will presumably affect all versions of React that include the current Hooks implementation (v16.8 onwards)
|
https://github.com/facebook/react/issues/15219
|
https://github.com/facebook/react/pull/20002
|
f668b6c351c2654fef43e5f1ec24fd72a899d219
|
b093528650db32b0112eb3adfcf9867e5f3b56d0
| 2019-03-27T00:53:53Z |
javascript
| 2020-10-16T15:07:27Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 15,113 |
["packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js", "packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js"]
|
eslint-plugin-react-hooks useCallback circular dependencies?
|
*bug/question*
**What is the current behavior?**
When there's a function that mentions itself wrapped with useCallback or useEffect, eslint-plugin-react-hooks will add the function to the list of dependencies causing no-use-before-define warnings
Example:
```js
const updateAndClean = useCallback(() => {
console.log("update something")
document.removeEventListener("event", updateAndClean);
});
```
The idea of the function above is to clean after itself when there's no need for the event anymore. I'm sure there are better ways to do that, but for the sake of the issue let's presume this is valid code.
eslint-plugin-react-hooks would propose adding "updateAndClean" to the list of dependencies:
```js
const updateAndClean = useCallback(() => {
console.log("update something")
document.removeEventListener("event", updateAndClean);
}, [updateAndClean]);
```
Causing no-use-before-define warning:
`Line 17: 'updateAndClean' was used before it was defined no-use-before-define`
Questions are:
- Is this ok to leave as is? would "using the function before defining it" break any useCallback optimisation?
- Can eslint-plugin-react-hooks not automatically fix that since it causes other warnings?
- Knowing the function needs to run once, can I pass an empty array to useCallback?
|
https://github.com/facebook/react/issues/15113
|
https://github.com/facebook/react/pull/15115
|
371bbf36bba53dd25fcab665bd43e7cebeecf6d3
|
f1ff4348c1debea8e0ce0fb35cc3fff342569789
| 2019-03-14T20:31:59Z |
javascript
| 2019-03-15T15:14:01Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 15,088 |
["packages/react-reconciler/src/ReactFiberHooks.new.js", "packages/react-reconciler/src/ReactFiberHooks.old.js", "packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.js"]
|
useReducer - eagerReducer optimization discussion/questions
|
I'd like to continue the discussion started by me under a recent blog post by Dan as encouraged by Dan 😉 https://github.com/gaearon/overreacted.io/commit/99bfdca459ff4094ee523c7419b58989d18bc594#r32694433
Just to summarize what I've stumbled upon when experimenting with useReducer after reading that hoisted & declared in render reducers are treated differently (I've wanted to explore how they are handled by React):
1. I have no idea how to reenter eagerReducer calculation after first scheduled work (& after render gets fully processed & committed). This might very well be just me not understanding how fibers work - but currently I'm confused by this. It doesn't enter this code branch because `fiber.expirationTime` is not 0 (NoWork) and the work gets scheduled right away. Any pointers regarding this? Is this valid? Might this be a bug somewhere?
2. The logic around reducer bailouts is somewhat iffy for me - maybe it's just a matter of mentioning those in the documentation:
- not every reducer update can bailout from rendering. If the action queue gets processed in the render phase then it's just not possible, we are already rendering after all.
- action queue gets processed in the render phase for reducers declared inside render, this means that any new state computation might depend on the "fresh" props. This is not the case for the bailout mechanism though - it's only possible to perform a bailout when dispatching an action (so when we do not have access to the fresh props). Should this restriction be mentioned in the docs? IMHO this behaviour is inconsistent - for the greater good, so it's acceptable but I think it should be documented because it's slightly inconsistent & people might trip over this.
**Note** I'm happy to provide documentation changes if needed, I'd like to discuss those points first to get a better understanding of things.
|
https://github.com/facebook/react/issues/15088
|
https://github.com/facebook/react/pull/22445
|
8131de13e29ba626dfd311c2b4e9bb42fa4d5d6c
|
66388150ef1dfef1388c634a2d2ce6760a92012f
| 2019-03-12T09:57:43Z |
javascript
| 2021-09-27T23:25:10Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,985 |
["package.json"]
|
package have wrong version
|
package.json have wrong version.
The current release is 16.8.3, but the package.json version is 16.6.1.
|
https://github.com/facebook/react/issues/14985
|
https://github.com/facebook/react/pull/15005
|
ce45ca9ba3243124df8a36cf92bae79c2125b427
|
ff596e3efb6a2f486e3466b94053d3c857dc8fe7
| 2019-03-01T03:49:36Z |
javascript
| 2019-03-04T20:36:17Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,949 |
["packages/eslint-plugin-react-hooks/package.json"]
|
eslint-plugin-react-hooks - does not support node 6
|
Currently eslint-plugin-react-hooks is stated to require node >= 6.
It should require node >= 7 since `Object.entries` is used:
https://github.com/facebook/react/blame/master/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js#L535
|
https://github.com/facebook/react/issues/14949
|
https://github.com/facebook/react/pull/14951
|
1d6b1660a29c452e954d053a14c5adc42ccf94ba
|
412f88296840f89d95bb619c7ca68e119ccfa0c3
| 2019-02-25T10:29:33Z |
javascript
| 2019-02-25T15:37:06Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,920 |
["packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js", "packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js"]
|
[ESLint] Feedback for 'exhaustive-deps' lint rule
|
## Common Answers
💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡
**We analyzed the comments on this post to provide some guidance: https://github.com/facebook/react/issues/14920#issuecomment-471070149.**
💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡
----
## What is this
This is a new ESLint rule that verifies the list of dependencies for Hooks like `useEffect` and similar, protecting against the stale closure pitfalls. For most cases it has an autofix. We'll add more documentation over the next weeks.

## Installation
```
yarn add eslint-plugin-react-hooks@next
# or
npm install eslint-plugin-react-hooks@next
```
ESLint config:
```js
{
"plugins": ["react-hooks"],
// ...
"rules": {
"react-hooks/rules-of-hooks": 'error',
"react-hooks/exhaustive-deps": 'warn' // <--- THIS IS THE NEW RULE
}
}
```
Simple test case to verify the rule works:
```js
function Foo(props) {
useEffect(() => {
console.log(props.name);
}, []); // <-- should error and offer autofix to [props.name]
}
```
## The lint rule complains but my code is fine!
**If this new `react-hooks/exhaustive-deps` lint rule fires for you but you think your code is correct**, please post in this issue.
----
# BEFORE YOU POST A COMMENT
**Please** include these three things:
1. A CodeSandbox demonstrating a **minimal code example** that still expresses your intent (not "foo bar" but **actual UI pattern** you're implementing).
2. An explanation of the **steps** a user does and what you expect to see on the screen.
3. An explanation of the **intended API** of your Hook/component.

## But my case is simple, I don't want to include those things!
It might be simple to you — but it’s not at all simple to us. **If your comment doesn't include either of them (e.g. no CodeSandbox link), we will hide your comment** because it’s very hard to track the discussion otherwise. Thank you for respecting everyone’s time by including them.
The end goal of this thread is to find common scenarios and transform them into better docs and warnings. This can only happen when enough details are available. Drive-by comments with incomplete code snippets significantly drive down the quality of the discussion — to the point that it's not worth it.
|
https://github.com/facebook/react/issues/14920
|
https://github.com/facebook/react/pull/14967
|
00748c53e183952696157088a858352cc77b0010
|
3ada82b7416c51290535a054f345b99378c38dcb
| 2019-02-21T19:03:49Z |
javascript
| 2019-02-27T16:59:11Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,919 |
["scripts/release/README.md", "scripts/release/publish-commands/print-follow-up-instructions.js"]
|
Adapt release process instructions to our patch release process
|
Basically this:
<img width="407" alt="screen shot 2019-02-21 at 6 06 46 pm" src="https://user-images.githubusercontent.com/810438/53191345-8246f180-3603-11e9-9fd0-bc9944da92f1.png">
|
https://github.com/facebook/react/issues/14919
|
https://github.com/facebook/react/pull/14923
|
f99fca3cb28e1fbd87e0b647ac43959add290be7
|
f708f9e307e5d2579a019b7d53cb06bac63d6d44
| 2019-02-21T18:07:17Z |
javascript
| 2019-02-22T15:43:18Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,918 |
["scripts/release/shared-commands/test-packaging-fixture.js", "scripts/release/shared-commands/test-tracing-fixture.js"]
|
Errors in tracing fixture shouldn't look like errors in packaging fixture
|
Before https://github.com/facebook/react/pull/14917, I used to get this:
<img width="502" alt="screen shot 2019-02-21 at 5 38 03 pm" src="https://user-images.githubusercontent.com/810438/53190100-cbe20d00-3600-11e9-9ffa-b230f3bb78fe.png">
|
https://github.com/facebook/react/issues/14918
|
https://github.com/facebook/react/pull/14922
|
f708f9e307e5d2579a019b7d53cb06bac63d6d44
|
33cb3f04f14638e9344dc59ae956f9805c07ab07
| 2019-02-21T17:47:54Z |
javascript
| 2019-02-22T15:43:27Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,904 |
["packages/react/src/ReactSharedInternals.js", "packages/scheduler/npm/umd/scheduler.development.js", "packages/scheduler/npm/umd/scheduler.production.min.js", "packages/scheduler/npm/umd/scheduler.profiling.min.js", "packages/scheduler/src/__tests__/SchedulerUMDBundle-test.internal.js"]
|
controlled input cursor jumps to end (again)
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
when typing in a controlled input, the cursor always jumps to the end. This was an old issue that seems to have resurfaced.
[this code pen](https://codepen.io/gaearon/pen/VmmPgp?editors=0010) used in the docs [here](https://reactjs.org/docs/forms.html#controlled-components) has the problem in all browsers as far as I have been able to test.
**What is the expected behavior?**
because we are using the state to update the component as soon as it's changed, the input element should be able to keep the cursor in the same place.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
I'm at latest (16.8.2) and I tested on Chrome, FireFox, and Edge on Windows
as far as I know, this was working at some point, though I don't know how long ago. possibly even before "Fiber"
|
https://github.com/facebook/react/issues/14904
|
https://github.com/facebook/react/pull/14914
|
d0318fb3f946ff359ff1b6e2c09bd7c724e3d05f
|
7de4d23919ab5c67a708560a5166b8cdb1547e26
| 2019-02-20T21:56:52Z |
javascript
| 2019-02-21T17:20:28Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,840 |
["packages/react-test-renderer/src/ReactShallowRenderer.js", "packages/react-test-renderer/src/__tests__/ReactShallowRenderer-test.js", "packages/react-test-renderer/src/__tests__/ReactShallowRendererHooks-test.js"]
|
Shallow renderer doesn't update on setState() with Hooks
|
See the issue and the test case with original fix in https://github.com/facebook/react/pull/14802.
We'll need to fix it properly, see https://github.com/facebook/react/pull/14802#issuecomment-463277621.
|
https://github.com/facebook/react/issues/14840
|
https://github.com/facebook/react/pull/15120
|
035e4cffbd16fd618ed1a5614838656a4a505936
|
8d60bd4dc2f7128c3de53474db50df000b14f677
| 2019-02-13T16:58:29Z |
javascript
| 2019-03-15T22:30:32Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,829 |
["packages/react-dom/src/shared/DOMProperty.js"]
|
crossOrigin attribute should be lowercased in rendered
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
A bug.
**What is the current behavior?**
When using
```html
<img crossOrigin="anonymous"/>
```
it is rendered as
```html
<img crossOrigin="anonymous">
```
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
https://jsfiddle.net/upsuper/y9q5fp3t/
**What is the expected behavior?**
`crossOrigin` should be lower-cased when rendering.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Latest version.
(This is basically just #14216, but that was closed because HTML attribute name is case-insensitive. However, this is still a problem for SVG, since SVG attribute name is case-sensitive, and thus `crossOrigin` doesn't work.)
|
https://github.com/facebook/react/issues/14829
|
https://github.com/facebook/react/pull/14832
|
c6bee765ba865298c69acdea70e1ec2d79f69efe
|
fa6205d522a9d3e3f228be18dd29f11f8930c394
| 2019-02-11T21:14:58Z |
javascript
| 2019-02-13T04:13:17Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,811 |
["packages/react-dom/src/__tests__/ReactDOMFiber-test.js", "packages/react-reconciler/src/ReactFiberCommitWork.js"]
|
unmount an empty component is breaking with ReactDOM portals
|
**Do you want to request a *feature* or report a *bug*?** Bug
**What is the current behavior?** When unmounting a component that has a child being rendered under a different parent (with portals), react is throwing an error
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem:**
https://codesandbox.io/s/73n31lwpjx
**What is the expected behavior?**
Component should unmount normally
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
16.8.1
Issue also happens with 16.7.0 (https://codesandbox.io/s/oxmpxmllvy)
The issue is only happening under very strict conditions:
- The component being rendered with ReactDOM Portals (Modal) should not render any HTML
- The parent component (Panel) should render Modal as the first component under <React.Fragment>
Avoiding this is as simple as moving Modal under some other HTML. I'm not entirely sure this is an issue or I'm just doing something wrong with Fragment and portals.
The actual error being thrown is:
`react-dom.development.js:9254 Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.`
|
https://github.com/facebook/react/issues/14811
|
https://github.com/facebook/react/pull/14820
|
e15542ee0f9c5ef5646820d59bde3a282e107d02
|
1fecba92307041e181ce425082d4d21ec8928728
| 2019-02-10T11:11:20Z |
javascript
| 2019-02-11T18:37:53Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,807 |
["packages/react-test-renderer/src/ReactShallowRenderer.js", "packages/react-test-renderer/src/__tests__/ReactShallowRenderer-test.js", "packages/react-test-renderer/src/__tests__/ReactShallowRendererMemo-test.js"]
|
Shallow renderer does not support React.memo
|
**Do you want to request a *feature* or report a *bug*?**
bug
**What is the current behavior?**
In normal rendering, you can memoize a class-based component: https://jsfiddle.net/586ea3cx/
With the shallow renderer, it seems like you can't: https://jsfiddle.net/odj217Lv/1/
This might be blocking https://github.com/airbnb/enzyme/pull/1914, in which tests are failing with `Cannot call a class as a function`. (it's tough to repro stuff with the shallow renderer)
|
https://github.com/facebook/react/issues/14807
|
https://github.com/facebook/react/pull/14816
|
f0621fe232f31cb0fcd63992c3440ec1b4ce5813
|
b283d75c17ff40cba1a49956d23b3985b9eb6abe
| 2019-02-09T08:44:57Z |
javascript
| 2019-03-15T22:17:09Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,793 |
["packages/react-dom/src/__tests__/ReactServerRendering-test.js", "packages/react-dom/src/server/ReactPartialRendererContext.js", "packages/react-reconciler/src/ReactFiberClassComponent.js", "packages/react/src/__tests__/ReactContextValidator-test.js"]
|
contextType apparently not working in dev mode server side rendering
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
Crash during server render due to `this.context` being undefined. Bug only happens in SSR, and only in dev mode react. Issue appears neither in browser renders, nor in production mode server renders.
note: Using https://reactjs.net/ for c# server-side rendering, with bundled-in version of react disabled (so using the same version of react as the client bundle)
(simplified) application structure
```
// root component
const {Provider, Consumer} = createContext({});
const Root = props => return <Provider value={props.notNull}>{props.children}</Provider>;
// consumer
class ConsumingComponent extends Component {
static contextType = Consumer;
render() {
if (this.context.someValue) return null;
return <div/>;
}
}
// render tree
<Root>...<ConsumingComponent/>...</Root>
// output of server render
JsRuntimeException: TypeError: unable to get property 'someValue' of undefined or null reference.
```
**What is the expected behavior?**
`this.context` in the consuming component should be the value passed to the Provider, and not `undefined`.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
The bug, as best as I can pin down, appeared in 16.6.3. The code works in 16.6..1, and 16.6.2 is listed as a broken release in the changelog.
|
https://github.com/facebook/react/issues/14793
|
https://github.com/facebook/react/pull/14831
|
2b93d686e359c7afa299e2ec5cf63160a32a1155
|
df7b87d25e74fbbaf19b822096d0651aa3ad6a9f
| 2019-02-08T01:21:30Z |
javascript
| 2019-03-18T19:27:05Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,792 |
["packages/react-dom/src/__tests__/ReactDOMHooks-test.js", "packages/react-reconciler/src/ReactFiberScheduler.js"]
|
Question: ReactDOM render call in useEffect delayed until first update
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
A question, maybe a bug but more likely a misunderstanding on my side.
**What is the current behavior?**
Calling `ReactDOM.render` from within a `useEffect` won't actually render to the dom unless an update is triggered from anywhere else within the entire react app.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
See: https://codesandbox.io/s/jl02nrqznw
**What is the expected behavior?**
After the `RendersAnotherRoot` component is initially rendered, the `useEffect` function is called and then the subsequent `ReactDOM.render` call renders the separate react root.
**Note**: Uncommenting the setCount update from within the `RendersAnotherRootWithUpdate` component will then render the content from both `useEffect` render calls.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
react 16.8.1
react-dom 16.8.1
|
https://github.com/facebook/react/issues/14792
|
https://github.com/facebook/react/pull/14799
|
f3a14951ab9bccfd59ca977493b72321b24e50a5
|
3ae94e1885b673543a30a05906c4f9a0e4b682cb
| 2019-02-08T00:09:18Z |
javascript
| 2019-02-12T20:18:35Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,782 |
["packages/react-reconciler/src/ReactFiberHooks.js", "packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.internal.js"]
|
useImperativeHandle behaves as if inputs are [] by default
|
useImperativeHandle have bug in 16.8.1 if you want to access any state will get the initial state not current state but in 16.8.0-alpha.1 it work good
You can see here https://codesandbox.io/s/xjl8znwpz open console when you change input value will get the currently value in console but if you clicked button get value from ref will get initial value (e)
If you try same here https://codesandbox.io/s/qxkll6po0j with 16.8.0-alpha.1 when clicked button get currently value
|
https://github.com/facebook/react/issues/14782
|
https://github.com/facebook/react/pull/14801
|
1fecba92307041e181ce425082d4d21ec8928728
|
f24a0da6e0f59484e5aafd0825bb1a6ed27d7182
| 2019-02-07T00:43:31Z |
javascript
| 2019-02-11T18:42:28Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,764 |
["packages/react-dom/src/test-utils/ReactTestUtils.js", "packages/react-test-renderer/src/__tests__/ReactTestRenderer-test.internal.js"]
|
16.8 regression: react-dom/test-utils no longer require()-able in pure node
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug. Behavior regression.
**What is the current behavior?**
Package throws when being required in Node.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
```
avi@localhost ~/projects/r168 node
> require('react-dom/test-utils')
ReferenceError: document is not defined
at /home/avi/projects/r168/node_modules/react-dom/cjs/react-dom-test-utils.development.js:944:27
at Object.<anonymous> (/home/avi/projects/r168/node_modules/react-dom/cjs/react-dom-test-utils.development.js:1283:5)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
```
**What is the expected behavior?**
`react-dom/test-utils` should not throw in "pure" node (without `jsdom` providing fake document on global).
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
happens on 16.8.0
previous versions work.
|
https://github.com/facebook/react/issues/14764
|
https://github.com/facebook/react/pull/14768
|
0975ea3278c4a203b73ad6cc1ea61c44a8eeeb17
|
1107b9673c779425a251ed5336ee8b6721498666
| 2019-02-06T10:29:55Z |
javascript
| 2019-02-06T16:25:26Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,705 |
["packages/react-dom/src/__tests__/ReactDOMServerIntegrationNewContext-test.js", "packages/react-dom/src/server/ReactPartialRenderer.js"]
|
Context leaks to later renders when render stream destroyed early
|
**Do you want to request a *feature* or report a *bug*?**
Bug.
**What is the current behavior?**
If a stream created with `.renderToNodeStream()` is destroyed before the render completes, memory can be retained unnecessarily by Contexts which were active at the time.
It's not a memory leak per se as memory use is not unbounded. There's a limit on number of threads in use and context slots are reused, so memory use can't increase endlessly.
Would only make a noticeable impact on an application which:
* renders using `.renderToNodeStream()` or `.renderToStaticMarkup()`
* stores large objects in Context (e.g. large data sets from fetch requests)
* experiences a spike in traffic which then recedes
* destroys a lot of streams prematurely (or has errors thrown in rendering which causes streams to be destroyed)
In the above case, when the spike hits, many threads are created for concurrent renderers. Each thread writes data into a slot of the Contexts it uses. When the threads are destroyed before the renders complete, the Context slots are not cleared, and so left filled with data which is no longer useful, but cannot be freed by GC.
When the spike recedes, this memory continues to be retained.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
I'll submit a PR with failing test case and fix shorty.
**What is the expected behavior?**
When stream is destroyed, it should clean up its resources.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Issue introduced in 961eb65b4ba5de6bbfb6b8a075a924c284541177 which is in 16.7.0.
|
https://github.com/facebook/react/issues/14705
|
https://github.com/facebook/react/pull/14706
|
3e5556043879c9c7b98dd9edfc0e89df0366714b
|
ab7a67b1dc0e44bf74545ccf51a8c143b3af7402
| 2019-01-26T14:13:33Z |
javascript
| 2019-02-14T19:50:23Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,629 |
["packages/react-reconciler/src/ReactFiberHooks.js", "packages/react-reconciler/src/ReactFiberScheduler.js", "packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js"]
|
useImperativeHandle should warn when second arg isn't a function
|
I've noticed a strange bug with the react redux `forwardRef` opt-in.
If i use it with a connected class component, everything is ok:
```javascript
const MyComponent = class Test extends React.Component {
foo = () => console.log("Print foo from Test component");
render() {
return null;
}
};
const ConnectedComponent = connect(
null,
null,
null,
{ forwardRef: true }
)(MyComponent);
const store = createStore(() => {});
function App() {
return (
<Provider store={store}>
<ConnectedComponent
ref={ref => {
if (ref) ref.foo();
}}
/>
</Provider>
);
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
```
If i use it with a connected functional component that use `forwardRef` with `useImperativeHandle`, i obtain a strange error: `create is not a function` in `commitHookEffectList` `react-dom` method.
```javascript
const MyComponent = React.forwardRef((props, ref) => {
useImperativeHandle(ref, {
foo: () => console.log("Print foo from Test component")
});
return null;
});
const ConnectedComponent = connect(
null,
null,
null,
{ forwardRef: true }
)(MyComponent);
const store = createStore(() => {});
function App() {
return (
<Provider store={store}>
<ConnectedComponent
ref={ref => {
if (ref) ref.foo();
}}
/>
</Provider>
);
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
```
I create a codepen to reproduce the issue: https://codesandbox.io/s/r7rpml460o
PS: Sorry for the cors error, but i don't find the way to add `react@next`as cdn
|
https://github.com/facebook/react/issues/14629
|
https://github.com/facebook/react/pull/14647
|
1fcbd22431d97e404c1f684744dc543b6c22b076
|
8f45a7fdc469c6d88ca5ca105095b03dd4e862e1
| 2019-01-18T14:56:20Z |
javascript
| 2019-01-21T19:44:18Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,607 |
["packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js", "packages/react-test-renderer/src/ReactShallowRenderer.js", "packages/react-test-renderer/src/__tests__/ReactShallowRenderer-test.js"]
|
Bug: in shallow renderer `this.state` in `shouldComponentUpdate` will be updated by `getDeriveStateFromProps`
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
In `react-test-renderer/shallow`, the shallow renderer will set instance state in `getDerviedStateFromProps` so the `this.state` and `nextState` will be the same in `shouldComponentUpdate`, which is different with the behavior of real rendering.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
given below class component:
```js
class SimpleComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
value: props.value,
};
}
static getDerivedStateFromProps(nextProps, prevState) {
if (nextProps.value === prevState.value) {
return null;
}
return { value: nextProps.value };
}
shouldComponentUpdate(nextProps, nextState) {
console.log('shouldUpdate:', nextState.value !== this.state.value)
return nextState.value !== this.state.value;
}
render() {
return <div className={this.state.value} />;
}
}
```
render with ReactDOM, the `shouldComponentUpdate` will return true since `this.state` will be the old value `initial`:
```js
const divRef = React.createRef()
const div = document.createElement('div')
// in real test code we have to add a `ref={divRef}` in the `div` of SimpleComponent
const initialResult = ReactDOM.render(<SimpleComponent value="initial" />, div);
expect(divRef.current.classList[0]).toEqual("initial");
// will output `shouldUpdate: true`
const updatedResult = ReactDOM.render(<SimpleComponent value="updated" />, div);
// so the class name changes
expect(divRef.current.classList[0]).toEqual("updated");
```
In shallow renderer, the behavior is different:
```js
const shallowRenderer = createRenderer();
const initialResult = shallowRenderer.render(<SimpleComponent value="initial" />);
expect(initialResult).toEqual(<div>value:initial</div>);
// will not update, since in `shouldComponentUpdate` the `this.state` has been updated
// after `getDeriveStateFromProps` and as same as passed `nextState`
const updatedResult = shallowRenderer.render(<SimpleComponent value="updated" />);
// the following assert will fail
expect(updatedResult).toEqual(<div>value:updated</div>);
```
**What is the expected behavior?**
ShallowRenderer should not set the instance state in getDeriveStateFromProps, or in the `shouldComponentUpdate` we have no way to compare it.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
I have tested this in master branch and 16.3, both not work.
By the way this problem is related to airbnb/enzyme#1970 . If it's recoginzed as a bug I can provide a PR in next several days.
|
https://github.com/facebook/react/issues/14607
|
https://github.com/facebook/react/pull/14613
|
e1cd83e49d24bd4761fb18bb0789715a2d5090f7
|
4f332885a2541e68c573d19ca94c875fdf988a38
| 2019-01-16T10:50:35Z |
javascript
| 2019-01-18T02:31:14Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,583 |
["packages/react-reconciler/src/ReactFiberUnwindWork.js"]
|
16.8.0-alpha.0 (and 16.7) IE11 Suspense doesn't stop rendering fallback after Lazy resolves
|
**Do you want to request a *feature* or report a *bug*?**
report a bug
**What is the current behavior?**
When using Suspense, I see React.Suspense fallback layout instead of loaded component in IE 11 (IE network panel shows, that bundle was loaded)
I can not reproduce this bug in 16.7.0-alpha.2! there is everything ok.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
```
const UserCabinet = React.lazy(() => import('PublicUser/components/UserCabinet/UserCabinet'));
function WaitingComponent(Component) {
return props => (
<React.Suspense fallback={<div>Loading...</div>}>
<Component {...props} />
</React.Suspense>
);
}
class PublicRoutes extends React.Component<{}> {
render() {
return (
<Switch>
<PublicPage path="/login" component={AuthPage} />
<PublicPage path="/signUp" component={SignUpPage} />
<PrivatePage path="/cabinet" component={WaitingComponent(UserCabinet)} />
<Redirect to="/login" />
</Switch>
);
}
}
```
**What is the expected behavior?**
see the rendered component
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Tested on IE11 on windows 7
It reproduces only in 16.8.0-alpha.0
I can not reproduce this bug in 16.7.0-alpha.2, there is everything ok.
In Chrome is everything ok in all versions.
|
https://github.com/facebook/react/issues/14583
|
https://github.com/facebook/react/pull/14592
|
edb1f595649b013a59a18f43c03a57035ddea19e
|
0fc15475139206f1f999b5c16bbe6f90142e936a
| 2019-01-13T21:43:25Z |
javascript
| 2019-01-15T01:00:15Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,551 |
["fixtures/dom/src/components/Header.js", "fixtures/dom/src/components/fixtures/email-inputs/EmailDisabledAttributesTestCase.js", "fixtures/dom/src/components/fixtures/email-inputs/EmailEnabledAttributesTestCase.js", "fixtures/dom/src/components/fixtures/email-inputs/JumpingCursorTestCase.js", "fixtures/dom/src/components/fixtures/email-inputs/index.js", "packages/react-dom/src/client/ReactDOMInput.js", "packages/react-dom/src/events/ChangeEventPlugin.js"]
|
Cursor jumps with controlled input with email type
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
a bug
**What is the current behavior?**
With an email input (`<input type="email" />`), the cursor jumps when there is space. Try the demo https://codesandbox.io/s/y7y93p2zx?moduleview=1.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**

**What is the expected behavior?**
The cursor should remain in the right position as user types
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
React 16
Chrome and Safari, not firefox
|
https://github.com/facebook/react/issues/14551
|
https://github.com/facebook/react/pull/18379
|
5ee0efe832769b845c98a41df8736e09a4f1061f
|
9b88b78b3d61e8fe81968d59b74592d5a53540b7
| 2019-01-08T23:29:59Z |
javascript
| 2020-04-01T18:30:26Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,475 |
["packages/eslint-plugin-react-hooks/src/RulesOfHooks.js"]
|
eslint-plugin-rules-of-react uses undocumented context.report signature
|
**Do you want to request a *feature* or report a *bug*?**
Possible bug
**What is the current behavior?**
`eslint-plugin-react-hooks` currently uses undocumented `context.report(node, message).`
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
Everything works fine in latest eslint (for now).
**What is the expected behavior?**
`eslint-plugin-react-hooks` uses [documented `context.report({ node, message })`](https://eslint.org/docs/developer-guide/working-with-rules#contextreport).
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
`eslint-plugin-react-hooks@latest`
I just noticed when working on a tslint port and typescript reported errors on every context.report usage. I'm happy to open a PR since a fix is pretty straight forward. It looks like a legacy signature that is still supported. Since this is undocumented however it might break unannounced. I tested it quickly on my local machine and couldn't detect observable changes in the reported errors.
From a quick dive it seems that positional arguments are handled by
https://github.com/eslint/eslint/blob/bc50dc7737496712463220e662946eb516e36ae1/lib/util/report-translator.js#L57
but this might only be an internal method. Hard to tell.
|
https://github.com/facebook/react/issues/14475
|
https://github.com/facebook/react/pull/14623
|
4f332885a2541e68c573d19ca94c875fdf988a38
|
d17d0b99c15893206a9035314fd18141c6117115
| 2018-12-20T11:38:28Z |
javascript
| 2019-01-18T09:26:11Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,365 |
["packages/react-reconciler/src/ReactFiber.js"]
|
Possible v8 de-opt for profiling react-dom bundles
|
I've observed that when React's profiling mode is enabled, updating the profiling fields [here](https://github.com/facebook/react/blob/1d25aa5787d4e19704c049c3cfa985d3b5190e0d/packages/react-reconciler/src/ReactProfilerTimer.js#L46) and [here](https://github.com/facebook/react/blob/1d25aa5787d4e19704c049c3cfa985d3b5190e0d/packages/react-reconciler/src/ReactProfilerTimer.js#L69-L71) during the _render_ phase seems to cause a significant deopt in [`getHostSibling`](https://github.com/facebook/react/blob/1d25aa5787d4e19704c049c3cfa985d3b5190e0d/packages/react-reconciler/src/ReactFiberCommitWork.js#L858-L898) during the _commit_ phase for Chrome only. (Neither Safari nor Firefox seem to be affected by this.)
I have created a repro case with inline annotations here:
https://github.com/bvaughn/react-profiling-v8-deopt-repro#about-this-repro-case
(Note that the above repo is private. Please tag me here if you need access.)
|
https://github.com/facebook/react/issues/14365
|
https://github.com/facebook/react/pull/14383
|
e382b0ba954688f1bc37e3fc776ceece2c04afd3
|
7a48c900b7d8c97580d62adfa3625a7b7567c998
| 2018-11-30T20:53:50Z |
javascript
| 2018-12-03T17:22:46Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,362 |
["packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js", "packages/eslint-plugin-react-hooks/src/RulesOfHooks.js"]
|
react-hooks linter fails with unusual for loop
|
**Do you want to request a *feature* or report a *bug*?**
bug
**What is the current behavior?**
React hooks linter fails with this piece of code
```js
function useHook() {
const ref = React.useRef([1, 2, 3]);
const res = []
// valid because there are not unexpected returns
if (ref.current) {
for (let i = 0; i !== ref.current.length && !ref.current[i]; ++i ) {
res.push(ref.current[i]);
}
}
React.useLayoutEffect(() => {});
}
```
however a bit more usual for loop is handled as expected
```js
function useHook() {
const ref = React.useRef([1, 2, 3]);
const res = []
if (ref.current) {
for (let i = 0; i !== ref.current.length; ++i ) {
res.push(ref.current[i]);
}
}
React.useLayoutEffect(() => {});
}
```
**What is the expected behavior?**
Skip for looks without returns
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
eslint-plugin-react-hooks 0.0.0
|
https://github.com/facebook/react/issues/14362
|
https://github.com/facebook/react/pull/14661
|
f11a9c1cb06514e40a50503e0f9bd26941251e06
|
e19c9e106401fd41c91b67273d4c22289ed0917c
| 2018-11-30T14:11:12Z |
javascript
| 2019-01-25T17:06:33Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,360 |
["packages/react-reconciler/src/ReactFiberHooks.js", "packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.internal.js"]
|
useReducer: dispatched actions are reduced twice
|
**Do you want to request a *feature* or report a *bug*?**
Report a *bug*
**What is the current behavior?**
There are cases where actions dispatched by `useReducer`'s dispatch function are reduced twice (in concurrent mode).
As far as I can tell from my first quick read of the code of react-dom (so I might be totally wrong!), this happens, when a higher priority action is added to a queue that already contains lower priority actions.
On the first run, that is caused by for example an onClick handler (higher priority), the dispatched action is appended to the queue. On processing the queue the lower priority actions (for example from setInterval events) are _ignored_ and the "onClick action" is reduced, but stays on the end of the queue, so that on the next time the queue is processed, that action gets reduced a second time.
See a testcase at:
https://codesandbox.io/s/nxq3w7rwl
Pressing the button increments the button (most of the time not always, depending if 'TICK' actions are in the queue) by two.
**What is the expected behavior?**
I'd expect a dispatched action to be only reduced once.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Tested with React 16.7.0-alpha.2 on Chrome (70.0.3538.110) and Safari (12.0.1) both on macOs
|
https://github.com/facebook/react/issues/14360
|
https://github.com/facebook/react/pull/14364
|
16e120438c5332d7590bc74b2cbd882f19a0e3b1
|
f1bf281605444b342f4c37718092accbe3f98702
| 2018-11-30T01:29:19Z |
javascript
| 2018-11-30T15:02:19Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,310 |
["packages/react-reconciler/src/ReactFiberBeginWork.js", "packages/react-reconciler/src/__tests__/ReactLazy-test.internal.js"]
|
Re-rendering lazy() doesn't respect defaultProps on memo()
|
With this:
```js
const Add = React.memo(props => {
return props.inner + props.outer;
});
Add.defaultProps = {
inner: 2,
};
const LazyAdd = lazy(() => fakeImport(Add));
```
If I render `LazyAdd` again after it resolves, it won't get the `inner` default prop value. This is a bug.
|
https://github.com/facebook/react/issues/14310
|
https://github.com/facebook/react/pull/14312
|
14be29b2b97f2be6c82955acc0455fbac22ec403
|
0c7189d92370717ce8c48cf4846b3a101056e772
| 2018-11-22T17:55:14Z |
javascript
| 2018-11-22T19:40:42Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,241 |
["packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.internal.js", "packages/react-dom/src/server/ReactPartialRendererHooks.js"]
|
useCallback returns undefined when the component is rendered server-side
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug.
**What is the current behavior?**
`React.useCallback` returns `undefined` when the component is rendered server-side.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
This bug can be reproduced by creating a React component using a `useCallback`. Logging the return value on the server yields `undefined` while it properly returns the function in the browser.
You can observe this bug in this CodeSandbox: https://codesandbox.io/s/r557kww6wn The application is properly rendered to a string bug looking at the console, you will see that the return value of `useCallback` is `undefined`.
Here's the exact same application but rendered on the client: https://codesandbox.io/s/xvwv797pxz The function is properly logged to the console.
**What is the expected behavior?**
`React.useCallback` should return the memoized callback, not `undefined`.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
* react: 16.7.0-alpha.2
* react-dom: 16.7.0-alpha.2
|
https://github.com/facebook/react/issues/14241
|
https://github.com/facebook/react/pull/14279
|
0e9cb3f5d0bfd4fe08ac8fcfba71302559614282
|
ccb14e270c3376ed47ca43c0c39722ba6bf6eced
| 2018-11-15T16:43:50Z |
javascript
| 2018-11-19T20:47:38Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,239 |
["fixtures/dom/src/components/fixtures/selects/index.js", "packages/react-dom/src/__tests__/ReactDOMSelect-test.js", "packages/react-dom/src/client/ReactDOMComponent.js"]
|
Regression: React 16 automatically marks first item of a select with size > 1 as checked
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug - regression
**What is the current behavior?**
In react 16 when creating a `<select size="3">` (size > 1) the first child <option> is automatically getting marked as selected. In React 16 there does not seem to be a way to specify no <option> gets selected by default
https://codesandbox.io/s/m76ozkwm89
**What is the expected behavior?**
In React 15 unless you marked an option to be selected <option selected> no options were selected by default.
https://codesandbox.io/s/6894m3k9w
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Reproducible in Chrome 72 and Firefox 59.
**Note:** this is almost a duplicate of #12200. In fact, I copied issue text and codesandbox examples, just changing `multiple` to `size="3"`.
|
https://github.com/facebook/react/issues/14239
|
https://github.com/facebook/react/pull/14242
|
935f60083f6c8bea8b90baa986954d60731a805b
|
ab5fe174c69ea4ea5019390f4234a83ef7ce8d52
| 2018-11-15T12:25:06Z |
javascript
| 2019-03-14T21:40:09Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,162 |
["packages/react-reconciler/src/ReactFiberBeginWork.js", "packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js"]
|
"Cannot set property 'return' of null" while using Suspense and lazy
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
bug
**What is the current behavior?**
Given code like this:
```jsx
<Suspense fallback={...}>
{this.state.render && <LazyComponent />}
</Suspense>
```
my `LazyComponent` should download and render when I run `this.setState({ render: true })`. Instead, I get an internal React error about setting property `null` of `return`.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
https://jsfiddle.net/cq9hfwe8/1/. Open the console to see the error message.
**What is the expected behavior?**
The combination of `Suspense` and `lazy` defer downloading and rendering my component until I set a state variable to `true`.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Tried on Windows in Chrome 71, React 16.6.1.
|
https://github.com/facebook/react/issues/14162
|
https://github.com/facebook/react/pull/14164
|
e58ecda9a2381735f2c326ee99a1ffa6486321ab
|
4b163fee1c494c35ac8b4ba49cd41e9c573b7a7b
| 2018-11-09T00:43:38Z |
javascript
| 2018-11-09T02:13:42Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,114 |
["packages/react-dom/src/client/ReactDOMHostConfig.js"]
|
Suspense/lazy not working as expected in IE11 (display: none not being removed)
|
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
Suspense adds display: none to all top level child elements in IE11.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
https://codesandbox.io/s/w0573w2owk
Code sandbox can't render in IE11 either, but in this example I would expect to not see IE11 because the div would have display: none on it.
**What is the expected behavior?**
To be visible and not have display: none on the children.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
I had to revert back to react-loadable to fix this.
|
https://github.com/facebook/react/issues/14114
|
https://github.com/facebook/react/pull/14126
|
affb2b50ca1dfa2b780e94039e98e3bb70faaaab
|
e4512991c91eee4117937d17b9b4749e2173f046
| 2018-11-05T21:27:18Z |
javascript
| 2018-11-06T19:24:44Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,102 |
["packages/react-dom/src/events/SyntheticKeyboardEvent.js", "packages/react-dom/src/events/__tests__/SyntheticKeyboardEvent-test.js"]
|
Synthetic KeyboardEvent should support KeyboardEvent.code
|
**Do you want to request a *feature* or report a *bug*?**
Feature
**What is the current behavior?**
The current synthetic keyboard event does not support the [`KeyboardEvent.code`](https://www.w3.org/TR/uievents/#dom-keyboardevent-code) property.
**What is the expected behavior?**
The synthetic keyboard event should pass along the [`KeyboardEvent.code`](https://www.w3.org/TR/uievents/#dom-keyboardevent-code) property. This is currently in the WD of DOM Events but is part of replacing `keyCode` and `charCode` and is much more consistent and easy to use. This is currently only supported by FF and Chrome ([CanIUse](https://caniuse.com/#feat=keyboardevent-code)) so it may be a bit premature to fully integrate. However `keyCode`, `charCode` and `which` are being deprecated so this will eventually need to be added.
Edit: I spoke too quickly, CanIUse shows that FF, Chrome, Safari and Opera support it. IE, Edge and most mobile browsers do not.
|
https://github.com/facebook/react/issues/14102
|
https://github.com/facebook/react/pull/18287
|
5022fdfd5f9b3639c9c8bb2df31100586d1cfd01
|
f625fce8578cc77113d9da8ffd02032a60477e6a
| 2018-11-05T16:28:51Z |
javascript
| 2020-04-04T13:24:46Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,073 |
["packages/react-dom/src/__tests__/ReactDOMSuspensePlaceholder-test.internal.js", "packages/react-reconciler/src/ReactFiberBeginWork.js", "packages/react-reconciler/src/ReactFiberCommitWork.js", "packages/react-reconciler/src/ReactFiberCompleteWork.js", "packages/react-reconciler/src/ReactFiberScheduler.js", "packages/react-reconciler/src/ReactFiberSuspenseComponent.js", "packages/react-reconciler/src/ReactFiberUnwindWork.js", "packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js", "packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.internal.js", "packages/react/src/__tests__/ReactProfiler-test.internal.js"]
|
Suspense fallback remounts when each child resolves
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Not sure if its a bug or a feature request.
**What is the current behavior?**
The component given as a fallback to Suspense is remounted each time a lazy child resolves.
https://codesandbox.io/s/z6v6x3n1np
This example shows how a fallback component, which counts up, is mounted more than once.
**What is the expected behavior?**
The fallback is mounted once and is only unmounted when all lazy children are resolved.
In the example the counter would run up to 9.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
[email protected]
|
https://github.com/facebook/react/issues/14073
|
https://github.com/facebook/react/pull/14083
|
9d47143e85105cc0213949fae33960200c38560f
|
e9a2ec915655fa1968b7d41c4e8ad9e90f7268cb
| 2018-11-02T11:57:22Z |
javascript
| 2018-11-06T00:32:50Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,038 |
["packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js", "packages/eslint-plugin-react-hooks/src/RulesOfHooks.js"]
|
eslint-plugin-react-hooks
|
```js
function Editor({ data: { page } }: EditorProps) {
if (page == null) throw Error('missing page data in editor')
const [editorValue, setEditorValue] = useState(() => {
}
```
I believe this should be a valid case, because throw.
|
https://github.com/facebook/react/issues/14038
|
https://github.com/facebook/react/pull/14040
|
169f935f781c764a8c04f441c5e27b00a0329e8c
|
3db8b80e1501b161b213b0b5405590e4325a0414
| 2018-10-30T22:39:26Z |
javascript
| 2018-10-31T00:13:24Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,022 |
["packages/react-dom/src/server/ReactPartialRenderer.js", "packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js", "packages/react-reconciler/src/__tests__/__snapshots__/ReactHooks-test.internal.js.snap"]
|
.currentDispatcher gets set to null when calling ReactDOMServer from ReactDOM
|
I happened to notice that React will throw `Hooks can only be called inside the body of a function component` if a sibling element calls `ReactDOMServer.renderToStaticMarkup`. I have a [fiddle](https://jsfiddle.net/er4kL3of/) that shows this behavior (I think you need to manually open your console to see the error).
If you wrap the sibling element in a component or even just assign it a variable, this issue does not occur.
It's easy to get around and is a pretty specific bug, but why might this be happening?
|
https://github.com/facebook/react/issues/14022
|
https://github.com/facebook/react/pull/14105
|
e9a2ec915655fa1968b7d41c4e8ad9e90f7268cb
|
600651e68e0686f606aca9fc559f8cdc5f7ed567
| 2018-10-29T18:21:46Z |
javascript
| 2018-11-06T01:15:11Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,013 |
["packages/react-dom/src/__tests__/ReactDOMSuspensePlaceholder-test.internal.js", "packages/react-reconciler/src/ReactFiberBeginWork.js", "packages/react-reconciler/src/ReactFiberCommitWork.js", "packages/react-reconciler/src/ReactFiberCompleteWork.js", "packages/react-reconciler/src/ReactFiberScheduler.js", "packages/react-reconciler/src/ReactFiberSuspenseComponent.js", "packages/react-reconciler/src/ReactFiberUnwindWork.js", "packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js", "packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.internal.js", "packages/react/src/__tests__/ReactProfiler-test.internal.js"]
|
Suspense doesn't "resolve" for subsequent times if was suspended again
|
**Do you want to request a *feature* or report a *bug*?**
Possibly a bug
**What is the current behavior?**
Repro demo: GitHub user search.
Type one character and wait after the list is rendered - everything works correctly. Subsequent fetches work this way.
Type two characters faster than results for the first character are rendered and fallback will never go although the second request is successful.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
https://codesandbox.io/s/k5v6ojz107
**What is the expected behavior?**
Suspense "resolves" with last resolved fetch and renders the list of users
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
react: 16.7.0-alpha.0
react-dom: 16.7.0-alpha.0
react-cache: 2.0.0-alpha.0
|
https://github.com/facebook/react/issues/14013
|
https://github.com/facebook/react/pull/14083
|
9d47143e85105cc0213949fae33960200c38560f
|
e9a2ec915655fa1968b7d41c4e8ad9e90f7268cb
| 2018-10-28T22:44:36Z |
javascript
| 2018-11-06T00:32:50Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 14,002 |
["packages/react-dom/src/client/ReactInputSelection.js"]
|
Safari Devtools flooded with security errors on react-dom selection work with iframes with diff origins
|
hey folks, looks like [this code](https://github.com/facebook/react/commit/b565f495319750d98628425d120312997bee410b) added small issue with safari and it could flood devtools console output with messages like this:
<img width="875" alt="screenshot 2018-10-26 at 15 25 33" src="https://user-images.githubusercontent.com/778908/47569863-0e3a5c80-d935-11e8-8e59-8d95d35ba131.png">
As I understand it happens [here](https://github.com/facebook/react/commit/b565f495319750d98628425d120312997bee410b#diff-a654f37b01573fc8006b426d56ad53ceR50) and I see you catch the error, but safari still adds the error message if you have iframes with different origin
|
https://github.com/facebook/react/issues/14002
|
https://github.com/facebook/react/pull/15099
|
b83e01cade6f86b9a127bdfdda60f625fd14fdcd
|
061d6ce3c0310d3b7f2122ad216be01bc4eff956
| 2018-10-27T19:09:31Z |
javascript
| 2019-03-20T13:11:54Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,999 |
["packages/react-dom/src/__tests__/ReactDOMSuspensePlaceholder-test.internal.js", "packages/react-reconciler/src/ReactFiberBeginWork.js", "packages/react-reconciler/src/ReactFiberCommitWork.js", "packages/react-reconciler/src/ReactFiberCompleteWork.js", "packages/react-reconciler/src/ReactFiberScheduler.js", "packages/react-reconciler/src/ReactFiberSuspenseComponent.js", "packages/react-reconciler/src/ReactFiberUnwindWork.js", "packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js", "packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.internal.js", "packages/react/src/__tests__/ReactProfiler-test.internal.js"]
|
Suspense doesn't stop rendering fallback after Lazy resolves
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
bug, I believe, unless I misunderstand how it works
**What is the current behavior?**
Given a `Suspense` inside `Suspense` case like
```
<Suspense fallback="Fallback 1">
<LazyText1 text="First text" />
<Suspense fallback="Fallback 2">
<LazyText2 text="Second text!" />
</Suspense>
</Suspense>
```
Promises in `LazyTexts` start resolving at the same time, but if `LazyText2` is resolved first it never renders, `Fallback 2` stays.
Result:
```
First text
Fallback 2
```
Please see https://codesandbox.io/s/234o4zry7n
**What is the expected behavior?**
Every `LazyText` displayed in the end
```
First text
Second text!
```
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
react, react-dom 16.6.0
|
https://github.com/facebook/react/issues/13999
|
https://github.com/facebook/react/pull/14083
|
9d47143e85105cc0213949fae33960200c38560f
|
e9a2ec915655fa1968b7d41c4e8ad9e90f7268cb
| 2018-10-27T12:08:32Z |
javascript
| 2018-11-06T00:32:50Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,964 |
["packages/react-reconciler/src/ReactFiberBeginWork.js", "packages/react-reconciler/src/__tests__/ReactMemo-test.internal.js"]
|
React.memo – attempting to assign a ref to a component wrapped in memo does not produce a friendly error message
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
Attempting to assign a ref to a component wrapped in React.memo does not produce a friendly error message. Attempting the same thing with a functional component *not* wrapped in memo gives a descriptive error ("Warning: Function components cannot be given refs. Attempts to access this ref will fail.").
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
I trust this is not needed for this case
**What is the expected behavior?**
The same error message as with a non-memo functional component should be displayed.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
16.6.0
|
https://github.com/facebook/react/issues/13964
|
https://github.com/facebook/react/pull/14178
|
8ae867e6b59dc281b35bfb991737892f4cc88037
|
1a6ab1e9b5d3ab2c7083d89c00836b4cb9eff306
| 2018-10-25T11:44:41Z |
javascript
| 2018-11-09T23:29:41Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,958 |
["packages/react-is/src/ReactIs.js", "packages/react-is/src/__tests__/ReactIs-test.js", "packages/shared/ReactSymbols.js", "packages/shared/__tests__/ReactSymbols-test.internal.js"]
|
react-is breaking change, re AsyncMode
|
It seems like react-is v16.6 no longer is compatible with React v16.3 - v16.5, in that React v16.3 - v16.5 will use `Symbol(react.async_mode)`, but `react-is`'s `AsyncMode` export will instead be `Symbol(react.concurrent_mode)`.
It seems like the async mode symbol needs to remain the same in react-is 16.6+, and the `isAsyncMode` function would need to check *both* the AsyncMode and ConcurrentMode symbols.
|
https://github.com/facebook/react/issues/13958
|
https://github.com/facebook/react/pull/13959
|
1ae3f29c2094b5a319889855923368deacd10b5b
|
cdbfa6b5dd692220e5996ec453d46fc10aff046a
| 2018-10-24T21:36:43Z |
javascript
| 2018-10-31T19:03:50Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,916 |
["packages/react-dom/src/events/getEventModifierState.js"]
|
Update getModifierState browser support comments
|
We have a few stale comments about getEventModifierState:
https://github.com/facebook/react/blob/663835a43a5a92ff63c3e3b43e4c9ff40dde173b/packages/react-dom/src/events/getEventModifierState.js#L24-L26
IE8 isn't an issue anymore, [but Safari probably still is](https://caniuse.com/#feat=keyboardevent-getmodifierstate). It'd be nice to figure out specifically why we still need this module and update the comment with that info.
|
https://github.com/facebook/react/issues/13916
|
https://github.com/facebook/react/pull/13918
|
275e76e83bc2be5dc0be9185ff747f383969289a
|
e217f2f1ac31e0d2c4e29c9a7b92399427b2c3a8
| 2018-10-21T18:30:45Z |
javascript
| 2018-10-27T16:52:01Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,864 |
["packages/react-reconciler/src/ReactFiberUnwindWork.js", "packages/react-reconciler/src/__tests__/ReactPure-test.internal.js", "packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js", "packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.internal.js"]
|
Suspense component should only capture if fallback prop is defined
|
*[Edit by @acdlite: Decided in comments below that we will change the semantics so that a missing `fallback` prop means the exception should propagate to the next parent (like a rethrow). That way a Suspense component can specify other props like `maxDuration` without needing to provide a fallback, too.]*
---
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
`<React.Suspense>` does not warn you if you omit a `fallback`). While redundant for TS/Flow usage, I misspelled the `fallback` prop by accident in a playground and was tearing my hair out trying to figure out why things were not working as expected.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
Omit a `fallback`.
**What is the expected behavior?**
React should warn during development if `fallback` is `undefined`.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Master
|
https://github.com/facebook/react/issues/13864
|
https://github.com/facebook/react/pull/13879
|
b738ced47717d7bd1e9083a3fbe9ab1be3b6588c
|
8ced545e3df95afab6fa35bc29f9320bafbcef26
| 2018-10-16T19:50:09Z |
javascript
| 2018-10-18T23:07:22Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,825 |
["packages/react-dom/src/client/ReactDOMComponent.js", "packages/react-dom/src/client/__tests__/trustedTypes-test.internal.js"]
|
script executed when tag name contains capital character
|
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
The code is:
```
class App extends React.Component {
render() {
return (
<div>
<sCript>alert('Hi');</sCript>
<script>alert('script 2: this should not execute');</script>
</div>
);
}
}
```
the script in ` <sCript>alert('Hi');</sCript>` executed.

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
Demo in codepen: https://codepen.io/zenany/pen/rqmPYq
**What is the expected behavior?**
`<sCript>alert('Hi');</sCript>` should not processed as code, this may cause security risk.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
versions:
```
"dependencies": {
"react": "^16.5.2",
"react-dom": "^16.5.2",
},
```
browser: firefox, chrome
|
https://github.com/facebook/react/issues/13825
|
https://github.com/facebook/react/pull/18660
|
9025949d840c89619bed9bf06f5c14c25c141c5a
|
e5cc1462b3e7be78306a1f6961ce82d942eb36d2
| 2018-10-11T07:58:12Z |
javascript
| 2020-04-21T19:10:25Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,820 |
["packages/react-dom/src/__tests__/ReactErrorBoundaries-test.internal.js", "packages/react-reconciler/src/ReactFiberScheduler.js"]
|
componentDidCatch doesn't catch some invariants
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
A bug.
**What is the current behavior?**
componentDidCatch isn't called when a child component renders a void element containing another element. The app just crashes.
If it contains just text, the same error ("...is a void element tag and must neither have children nor use dangerouslySetInnerHTML") appears, but this time with componentDidCatch properly called.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
https://codesandbox.io/s/0042z5wrlp
The behavior is different when you change Comp1 with Comp2.
**What is the expected behavior?**
componentDidCatch should be called in both cases.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
16.5.2.
In 16.4.2 it worked correctly.
|
https://github.com/facebook/react/issues/13820
|
https://github.com/facebook/react/pull/14104
|
b020fb1148f2da7495bd1d5425af0622b71100d4
|
3c69a1881421d46d738e2782fe3ec0ae9b5cb39c
| 2018-10-10T18:58:40Z |
javascript
| 2018-11-06T23:38:12Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,777 |
["packages/react-dom/src/__tests__/ReactDOMComponent-test.js", "packages/react-dom/src/client/ReactDOM.js", "packages/react-dom/src/client/ReactDOMHostConfig.js"]
|
The gray overlay when tap the react root container
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
*bug*
**What is the current behavior?**
Since [email protected] seems that `root` element has `onclick` event handler with noop function.
In ios Safari/Chrome browsers html element has gray overlay when tap on it.
The current behavior is that the whole `root` is blinking when we tap on it.
The simple example to reproduce:
https://codesandbox.io/s/wyo8rlj1zk
The issue is reproducing only in fullscreen mode https://wyo8rlj1zk.codesandbox.io/
(root container is steel blue)
I suppose changes came from here:
https://github.com/facebook/react/pull/11927
https://github.com/facebook/react/pull/11927/files
and the issue can be related with:
https://github.com/mui-org/material-ui/issues/11154
https://github.com/facebook/react/issues/12717
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
React 16.5
ios 11.3/12 Safari/Chrome
|
https://github.com/facebook/react/issues/13777
|
https://github.com/facebook/react/pull/13778
|
b2cea9078d28015ce95a4da523a4172b171989ad
|
f47a958ea8d328190c88bac1ad6f85eaaaefc310
| 2018-10-04T22:20:19Z |
javascript
| 2018-10-09T08:27:06Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,694 |
["packages/scheduler/src/Scheduler.js"]
|
Schedule, SSR, window.addEventListener is not a function
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
window.addEventListener is not a function in node_modules/schedule/cjs/schedule.development.js:366:10
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
- Build server.bundle.js for ssr (node) as usual
- Try to run it with "node server.bundle.js"
- See "window.addEventListener is not a function in node_modules/schedule/cjs/schedule.development.js:366:10"
- console.log(window) 1 line before 366 returns "{ navigator: {}, server: true }"
**What is the expected behavior?**
working as usual
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
"react": "^16.3.2"
Well, it worked just fine before I did yarn upgrade, first since March, I guess.
|
https://github.com/facebook/react/issues/13694
|
https://github.com/facebook/react/pull/13731
|
d0c0ec98ef1fdf0791aeca38a0fa857fe52d9845
|
7601c3765457a4ec7b2d48c0ca75fccf7fecf917
| 2018-09-19T19:32:11Z |
javascript
| 2018-09-26T12:38:56Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,688 |
["packages/shared/invokeGuardedCallbackImpl.js"]
|
Global `window.event` is overwritten in React 16.5+ in development mode.
|
**Do you want to request a *feature* or report a *bug*?**
Report a bug.
**What is the current behavior?**
Global `window.event` is overwritten in React 16.5+ in development mode. Here're minimal repro steps:
- React **16.5.2 in dev mode**: https://jsfiddle.net/sergei_startsev/ecz103vL/2/
If you click the button, you see `DOMContentLoaded` event type.
**What is the expected behavior?**
The current behavior contradicts with specified behavior [window property event returns the Event which is **currently being handled** by the site's code. Outside the context of an event handler, the value is **always** `undefined`](https://developer.mozilla.org/en-US/docs/Web/API/Window/event). Moreover it works properly in production mode:
- React **16.5.2 in prod mode**: https://jsfiddle.net/sergei_startsev/st5L8e02/2/
It returns expected `click` event type.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
It works properly in React 16.4.2 and prod mode:
- React **16.4.2** in dev mode: https://jsfiddle.net/sergei_startsev/o26L08qw/
The issue is reproduced in Chrome 69. It works properly in FF 62 (`window.event` isn't support in 62, however it should be reproduced in FF 63 - it was recently added, see [details](https://developer.mozilla.org/en-US/docs/Web/API/Window/event#Browser_Compatibility)).
It seems that the issue was introduced by @ConradIrwin in #11696.
|
https://github.com/facebook/react/issues/13688
|
https://github.com/facebook/react/pull/13697
|
a775a767a1d61ef07024cbe9adc9e8f4099d9546
|
17e703cb9692c26795c794a54e2239f603ee090d
| 2018-09-19T13:49:45Z |
javascript
| 2018-09-25T15:24:23Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,648 |
["packages/react-dom/src/client/ReactDOMSelection.js"]
|
16.5 with better support of iframe has some side effects
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
bug
**What is the current behavior?**
When transitioning from a state having an iframe inside a component to a state without that said iframe, we have an error at `setOffsets(node, offsets)` because `node.ownerDocument.defaultView` being `null`
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
Working on it
**What is the expected behavior?**
Should not break
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Affected since this 16.5.0, coming from this PR exactly https://github.com/facebook/react/pull/12037/files#diff-26d90cba6ee597ef475fa80dcf76ae1d
`getOffsets` as a check on `ownerDocument.default` fallbacks to `window`, but `setOffsets` does not.
Is there a reason why?
|
https://github.com/facebook/react/issues/13648
|
https://github.com/facebook/react/pull/13650
|
8bc0bcabe7505a991e9e40a4b8ad1d3eb9b5723f
|
9c961c0a279e31015b8df987bd86e6fec7548614
| 2018-09-14T08:15:25Z |
javascript
| 2018-09-14T15:44:14Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,634 |
["packages/schedule/npm/umd/schedule-tracing.profiling.min.js", "packages/schedule/npm/umd/schedule.profiling.min.js", "packages/schedule/src/__tests__/ScheduleUMDBundle-test.internal.js", "scripts/rollup/build.js", "scripts/rollup/bundles.js", "scripts/rollup/forks.js", "scripts/rollup/modules.js", "scripts/rollup/packaging.js", "scripts/rollup/wrappers.js"]
|
Missing UMD variant of react.profiling.min.js
|
The 16.5.0 package released to unpkg currently has the production/profiling variant present for cjs builds but there is no equivalent for umd builds.
i.e. There is the file https://unpkg.com/[email protected]/cjs/react.profiling.min.js but there is no https://unpkg.com/[email protected]/umd/react.profiling.min.js
It would be great if a future release had the profiling variant packaged as umd as well.
Also thanks for the awesome framework!
|
https://github.com/facebook/react/issues/13634
|
https://github.com/facebook/react/pull/13642
|
b488a5d9c5a2c38e2fdad2925a15a4bc863e23e5
|
8bc0bcabe7505a991e9e40a4b8ad1d3eb9b5723f
| 2018-09-13T01:10:45Z |
javascript
| 2018-09-14T00:44:08Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,601 |
["packages/react-reconciler/src/ReactFiberScheduler.js", "packages/react-reconciler/src/__tests__/ReactTracking-test.internal.js", "packages/schedule/npm/tracking-profiling.js", "packages/schedule/package.json"]
|
react-dom/profiling TypeError: Cannot read property 'current' of null
|
I can't quite figure out how to use the profiling build. I aliased `react-dom` to `react-dom/profiling` but I get this error:
<img width="448" alt="screen shot 2018-09-08 at 20 17 02" src="https://user-images.githubusercontent.com/810438/45257816-2d405780-b3a4-11e8-9615-0b27abd0442b.png">
<img width="272" alt="screen shot 2018-09-08 at 20 17 06" src="https://user-images.githubusercontent.com/810438/45257817-2d405780-b3a4-11e8-8a08-f5a0650debfe.png">
I didn't want interactions, I just want profiling. What am I doing wrong?
To repro, use CRA, then eject, then add `react-dom` -> `react-dom/profiling` to alias in webpack prod config and build.
|
https://github.com/facebook/react/issues/13601
|
https://github.com/facebook/react/pull/13605
|
144328fe81719e916b946e22660479e31561bb0b
|
03ab1efeb4dde9e07b93ff038c87cc4fa443abf4
| 2018-09-08T19:17:46Z |
javascript
| 2018-09-10T15:32:56Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,589 |
["packages/events/__tests__/ResponderEventPlugin-test.internal.js", "packages/react-dom/src/client/ReactDOM.js", "packages/react-dom/src/test-utils/ReactTestUtils.js", "packages/react-dom/src/unstable-native-dependencies/ReactDOMUnstableNativeDependencies.js", "scripts/rollup/results.json"]
|
[bug][16.5] broke React Native for Web
|
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
React Native for Web was broken by 16.5 as describe [here](https://github.com/necolas/react-native-web/issues/1096) due to this change https://github.com/facebook/react/pull/13539
**What is the expected behavior?**
Release a version of React that exports the EventPluginHub.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Worked in 16.4
|
https://github.com/facebook/react/issues/13589
|
https://github.com/facebook/react/pull/13598
|
8d1038fc6dee1d0264b5ec9f8bb13305e7495b8e
|
7d1169b2d7ad8d2345c28a2063bc101a4cc2d570
| 2018-09-07T15:25:02Z |
javascript
| 2018-09-08T19:07:59Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,580 |
["packages/react-dom/src/__tests__/ReactCompositeComponent-test.js", "packages/react-reconciler/src/ReactFiber.js"]
|
[bug] [16.5.0] shouldConstruct check
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Reporting a bug.
**What is the current behavior?**
With the recent change to `shouldConstruct` (https://github.com/facebook/react/commit/5031ebf6beddf88cac15f4d2c9e91f8dbb91d59d#diff-9ba7cab7f838d9f9071d2fb8ccbf48bfL282) the logic for checking the `isReactComponent` prototype property has become more strict. It turns out we are using a few dependencies that are defining a method called `isReactComponent` and this update caused these components to be treated as an `IndeterminateComponent` type internally.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
https://codesandbox.io/s/v3qw39wky
**What is the expected behavior?**
It would be nice if React could recognize this case and maybe log an error in development. I'm happy to try implementing this if you want to go that route. People definitely shouldn't be defining `isReactComponent` on their own components, but if it happens a quick check and an error message would make it a quick fix.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Impacts only v16.5.0. It wasn't an issue due to the less exhaustive check in earlier versions.
|
https://github.com/facebook/react/issues/13580
|
https://github.com/facebook/react/pull/13608
|
03ab1efeb4dde9e07b93ff038c87cc4fa443abf4
|
4a40d7624575d030e2d2aa98b24000e59a9e4f02
| 2018-09-06T19:05:54Z |
javascript
| 2018-09-10T16:54:45Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,574 |
["fixtures/tracing/test.html", "fixtures/tracing/test.js", "packages/react-reconciler/src/ReactFiberBeginWork.js", "packages/react-reconciler/src/ReactFiberScheduler.js", "packages/react-reconciler/src/ReactFiberUnwindWork.js", "packages/react/src/__tests__/ReactProfiler-test.internal.js", "packages/react/src/__tests__/ReactProfilerDOM-test.internal.js"]
|
Interaction reference count decremented too aggressively
|
Under certain conditions we decrement the `__count` attribute too often, which can result in `onInteractionScheduledWorkCompleted` being called prematurely and/or more than once for a given interaction.
- [x] Track interactions scheduled during (sync) render phase.
- [x] Do not double-decrement suspense loads within a sync render.
- [x] Do not decrement sync commits that are waiting on suspense when the `Placeholder` is past its expiration.
- [x] Properly decrement pending interaction count when a suspense resource loads before its placeholder is shown.
- [x] Add test with high priority render between suspended and resolved suspense states (for both sync and async rendering)
|
https://github.com/facebook/react/issues/13574
|
https://github.com/facebook/react/pull/13590
|
17e703cb9692c26795c794a54e2239f603ee090d
|
13965b4d3016de0ed28e73a38e60c18259bc2c23
| 2018-09-05T22:43:34Z |
javascript
| 2018-09-25T16:27:41Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,518 |
["fixtures/dom/src/components/Header.js", "fixtures/dom/src/components/fixtures/progress/index.js"]
|
Add <progress> to DOM fixtures
|
Maybe I missed it but I don't see this case in DOM fixtures:
https://github.com/facebook/react/pull/7359#discussion_r77518170
Seems important because it's easy to accidentally gloss over it if we stop syncing attributes and have to edit a bunch of jsdom tests.
|
https://github.com/facebook/react/issues/13518
|
https://github.com/facebook/react/pull/18293
|
3c16baf848e7d3b5bab96ab34cc9097ddfea76de
|
c083a643b1539b4d874895fabc19a34ecd2831ed
| 2018-08-30T19:32:09Z |
javascript
| 2020-04-03T13:39:59Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,436 |
["fixtures/unstable-async/suspense/src/components/App.js"]
|
Suspense fixture/demo: page scrolls to top unnecessarily
|
https://twitter.com/rauchg/status/1030613789425598464
If you open that demo (which lives in this repo’s fixtures folder) on a small screen, tapping one of the rows at the bottom (ex: my name) causes the page to scroll to the top immediately, which means you don’t see the inline loading indicator.
It should scroll to top after the data loads but not before.
|
https://github.com/facebook/react/issues/13436
|
https://github.com/facebook/react/pull/13437
|
d670bdc6b1ed4fc8c0c935aa26a2d448c969e0e9
|
3cae7543be5eecf4d9b70bc366b79a402044e0ec
| 2018-08-18T20:15:01Z |
javascript
| 2018-08-20T21:01:12Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,425 |
["packages/react-dom/src/__tests__/ReactDOMFiber-test.js", "packages/react-noop-renderer/src/createReactNoop.js", "packages/react-reconciler/src/ReactFiberCompleteWork.js", "packages/react-reconciler/src/__tests__/ReactIncrementalUpdatesMinimalism-test.js", "packages/react-reconciler/src/__tests__/__snapshots__/ReactIncrementalPerf-test.internal.js.snap"]
|
Host components outside the setState path are sometimes unnecessarily diffed and updated
|
Extracted from https://github.com/facebook/react/issues/12643.
We're currently diff a host node in the complete phase even if it has bailed out in the begin phase. By itself, this just means we're doing a little bit more work than necessary. But it also has some observable effects. In particular, https://github.com/facebook/react/issues/13424 (which by itself would be very rare and probably not worth fixing) is made worse because we end up committing update to inputs from another component.
I have a fix for this in https://github.com/facebook/react/pull/13423. Filing this for posterity.
|
https://github.com/facebook/react/issues/13425
|
https://github.com/facebook/react/pull/13423
|
5e0f073d509a74353533233706fce2e8044a0a15
|
d2f5c3fbc211a2ff257c43c879f3213d95f31222
| 2018-08-17T16:48:43Z |
javascript
| 2018-08-17T17:13:46Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,336 |
["packages/react-reconciler/src/ReactFiberBeginWork.js", "packages/react-reconciler/src/ReactFiberClassComponent.js", "packages/react/src/__tests__/ReactCoffeeScriptClass-test.coffee", "packages/react/src/__tests__/ReactContextValidator-test.js", "packages/react/src/__tests__/ReactES6Class-test.js", "packages/react/src/__tests__/ReactTypeScriptClass-test.ts"]
|
Imperative wrappers can't access current context value in commit phase
|
Sometimes we have an imperative wrapper like this:
```js
componentDidMount() {
renderSomethingImperatively(this.props)
}
componentDidUpdate() {
renderSomethingImperatively(this.props)
}
render() {
return null
}
```
Portals eliminated the need for this for regular DOM jumps. But we still need this for embedding renderers (e.g. `react-art` [does this](https://github.com/facebook/react/blob/3b3b7fcbbdc734d7f2a2e509a0b07c0eb053f779/packages/react-art/src/ReactART.js#L59-L84)) and use cases like "Vue inside React".
For cross-renderer embedding, maybe we could extend portals to do that (https://github.com/facebook/react/issues/13332). There are still imperative use cases for cross-library rendering though.
One thing that becomes annoying is that new context won't propagate down through this imperative boundary. This is because we don't maintain a stack in the commit phase. We're traversing a flat linked list of effects. So we don't actually know what context value is current by the time `componentDidMount` or `componentDidUpdate` fires.
For `react-art` and friends, this means context from a host app is not accessible. This is quite annoying. You could hack around it with something like
```js
<MyConsumer>
{value =>
<ReactART.Surface>
<MyContext.Provider value={value}>
<Stuff />
</MyContext.Provider>
</ReactART.Surface>
}
</MyConsumer>
```
But this is neither obvious nor convenient. You have to anticipate all contexts that can get used below.
This seems even less convenient for imperative cases like "Vue inside React".
```js
componentDidMount() {
renderSomethingImperatively(this.props) // ???
}
componentDidUpdate() {
renderSomethingImperatively(this.props) // ???
}
render() {
// <MyConsumer>{value => ???}</MyConsumer>
return <div />
}
```
Seems like you could use `unstable_read()` in `getDerivedStateFromProps` and that would put it into state so you can use it in lifecycles. So maybe that's sufficient. It still means you need to be explicit about which contexts you want to remember though.
I wonder if we can find a better solution to these use cases.
|
https://github.com/facebook/react/issues/13336
|
https://github.com/facebook/react/pull/13728
|
f305d2a489e75a27f843fcca917dfd13e994268d
|
4b68a6498ba1bd1b81208a9340e0c405f45d4cc4
| 2018-08-07T01:30:41Z |
javascript
| 2018-09-25T22:49:46Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,334 |
["packages/react-reconciler/src/ReactFiberScheduler.js"]
|
Excessive iteration when multiple roots are scheduled from a lifecycle
|
I was looking at https://github.com/facebook/react/issues/12700, and this seemed suspicious.
Consider this case:
```js
class App extends React.Component {
componentDidMount() {
for (let i = 0; i < 10000; i++) {
ReactDOM.render(<div />, document.createElement('div'));
}
}
render() {
return null
}
}
ReactDOM.render(<App />, document.getElementById('root'));
```
Profiling tells me we spend a *lot* of time searching for a root:
<img width="838" alt="screen shot 2018-08-07 at 12 12 52 am" src="https://user-images.githubusercontent.com/810438/43745499-f8716922-99d6-11e8-8822-380dcb15bfa3.png">
Adding some logging shows that e.g. for a 1000 roots, we'll run [this loop iteration](https://github.com/facebook/react/blob/master/packages/react-reconciler/src/ReactFiberScheduler.js#L1798-L1846) 1000 times for the first root, then 999 times for the second root, then 998 times for the third root, etc. Oops.
This is surely a bug?
|
https://github.com/facebook/react/issues/13334
|
https://github.com/facebook/react/pull/13335
|
43a137d9c13064b530d95ba51138ec1607de2c99
|
3b3b7fcbbdc734d7f2a2e509a0b07c0eb053f779
| 2018-08-06T23:16:50Z |
javascript
| 2018-08-07T00:59:18Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,309 |
["packages/react-reconciler/src/ReactFiber.js", "packages/react-reconciler/src/ReactFiberBeginWork.js", "packages/react-reconciler/src/ReactFiberCompleteWork.js", "packages/react-reconciler/src/ReactFiberScheduler.js", "packages/react-reconciler/src/ReactFiberUnwindWork.js", "packages/react-reconciler/src/ReactProfilerTimer.js", "packages/react/src/__tests__/ReactProfiler-test.internal.js"]
|
Profiler durations are sometimes incorrect
|
While working on the DevTools profiler, I've noticed that durations are sometimes incorrect. This seems to be vaguely related to high/low priority state updates. Need to track this down more so I'm filing an issue for myself.
|
https://github.com/facebook/react/issues/13309
|
https://github.com/facebook/react/pull/13313
|
1209ae50f3490b76d2de777837359f8c1ad910fa
|
067cc24f55ef01a233be9e7564b337e35fed72ea
| 2018-08-02T14:42:49Z |
javascript
| 2018-08-08T16:42:53Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,299 |
["packages/react-dom/src/client/ReactDOMFiberComponent.js"]
|
Warning: The tag <webview> is unrecognized in this browser
|
**Do you want to request a *feature* or report a *bug*?**
Bug (for electron users)
**What is the current behavior?**
When running jest, if any components containing a webview element are rendered, a warning is rendered to the console. When many tests are run, the output is littered with warnings.
> console.error node_modules/fbjs/lib/warning.js:33
> Warning: The tag <webview> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
https://jsfiddle.net/Luktwrdm/859/
**What is the expected behavior?**
No warning is logged to the console.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
React: 16.4.1
Electron: 2.0.6
Unknown if it worked in prior versions of react.
|
https://github.com/facebook/react/issues/13299
|
https://github.com/facebook/react/pull/13301
|
0182a74632b66a226921ca13dcfe359c67e15c6f
|
b381f4141147931f9af8a79555d155b0e496e672
| 2018-08-01T14:49:34Z |
javascript
| 2018-08-01T16:07:52Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,224 |
["packages/events/SyntheticEvent.js", "packages/react-dom/src/events/__tests__/SyntheticEvent-test.js"]
|
Seal or Prevent Extensions on Pooled Events
|
<s>I'm going to revert</s> I have reverted https://github.com/facebook/react/pull/5947 because it's [very confusing](https://mobile.twitter.com/ReactStudent/status/1018749513572368384) to see Proxies in the console. The warning is just not worth the debugging impediment.
In the future, we should consider sealing or preventing extensions to pooled events (if we're not getting rid of pooling altogether, that is). But that would be a breaking change.
|
https://github.com/facebook/react/issues/13224
|
https://github.com/facebook/react/pull/13225
|
171e0b7d447a20b7cc90808a95478c6e5b8b6af0
|
acbb4f93f09ca37f02136f9aa6f7425fde1da2cc
| 2018-07-17T21:57:39Z |
javascript
| 2018-07-17T23:14:13Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,222 |
["fixtures/dom/src/components/fixtures/selects/index.js", "packages/react-dom/src/client/ReactDOMFiberComponent.js"]
|
Select multiple - does not scroll to selected item(items)
|
*bug*
In react@15 we could set "value" or "defaultValue", and selected element scrolled into view.
https://codesandbox.io/s/6vx637r10n
But in react@16 this does not work.
https://codesandbox.io/s/7jqqz3zmo1
|
https://github.com/facebook/react/issues/13222
|
https://github.com/facebook/react/pull/13270
|
b179bae0ae3a9d80bfbe440c8861786b7f928ce1
|
2d0356a5243b880a8bff853a6bbde97f223dbacf
| 2018-07-17T10:29:34Z |
javascript
| 2018-08-03T17:05:25Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,150 |
["packages/react-art/src/__tests__/ReactART-test.js", "packages/react-test-renderer/src/ReactTestHostConfig.js", "packages/react-test-renderer/src/__tests__/ReactTestRenderer-test.internal.js"]
|
Enzyme + Context API = Warning: Detected multiple renderers concurrently rendering the same context provider
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?** Bug, I guess
**What is the current behavior?**
```
console.error node_modules/fbjs/lib/warning.js:33
Warning: Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.
```
Steps to reproduce the behavior:
1. `git clone https://github.com/stereobooster/react-context-issue`
2. `cd react-context-issue`
3. `yarn`
4. `yarn test`
**What is the expected behavior?** no warning
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** React 16.4. Browser not affected, because error is in node.js
Open this because of https://github.com/facebook/react/pull/13127#issuecomment-402527012
Issue happens because of Enzyme (https://github.com/airbnb/enzyme/issues/1693), code is unreleased, so I copy-pasted it from master.
I'm looking for advice or some clue on how to fix this, so I would be able to create PR in Enzyme repo (or in React repo if this is the case). Thank you.
|
https://github.com/facebook/react/issues/13150
|
https://github.com/facebook/react/pull/13164
|
ddc91af7957f3cca6910a95cef71076897ebdb53
|
ebbd2214326ca6a5f24f46ea7eaffc6cfabbbe1c
| 2018-07-04T18:43:22Z |
javascript
| 2018-07-06T23:04:45Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,148 |
["packages/react-reconciler/src/ReactFiber.js", "packages/react-reconciler/src/ReactFiberCommitWork.js", "packages/react-reconciler/src/ReactFiberScheduler.js", "packages/react-reconciler/src/ReactProfilerTimer.js", "packages/react/src/__tests__/ReactProfilerDevToolsIntegration-test.internal.js"]
|
Better feature detection for DevTools Profiler plug-in
|
(Regarding the experimental `React.unstable_Profiler` API and reactjs/rfcs/pull/51.)
PR #13058 changed the behavior of React profiling builds to opt host roots into `ProfileMode` if the React DevTools extension is detected. This was necessary in order to have accurate tree base time measurements for the visual flame graphs.
The Profiler plug-in for DevTools does feature detection to determine if it's enabled by looking at each root and seeing if any of the fibers contain an `actualDuration` attribute,
The problem is that the `actualDuration` attribute will be present on v16.4 fibers, which pre-date PR #13058. As a result, the Profiler UI may enable itself with versions of React that it cannot work correctly with.
Perhaps an easy solution would be to rename one of the `unstable_Profiler`'s fiber attributes prior to the next minor release (e.g. `treeBaseTime` -> `treeBaseDuration`) and change the DevTools Profiler to feature check using this new name instead.
|
https://github.com/facebook/react/issues/13148
|
https://github.com/facebook/react/pull/13156
|
1386ccddd8cecc5979d79c0e9bbbd59373c6a2fc
|
6f6b560a645adb595ba1e40630a3915d8abdf038
| 2018-07-04T15:26:38Z |
javascript
| 2018-07-06T15:25:29Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,141 |
["packages/react-test-renderer/src/ReactShallowRenderer.js", "packages/react-test-renderer/src/__tests__/ReactShallowRenderer-test.js"]
|
react-test-renderer shallow: SFCs should not get `this`
|
**Do you want to request a *feature* or report a *bug*?**
bug.
**What is the current behavior?**
This addresses a bug in `enzyme`, https://github.com/airbnb/enzyme/issues/1683.
On [this line](https://github.com/facebook/react/blob/master/packages/react-test-renderer/src/ReactShallowRenderer.js#L110) `element.type()` invokes the SFC with `element` as the `this` value. I believe that this is needed for create-react-class components, but that there needs to be a separate branch for SFCs.
**What is the expected behavior?**
`this` inside a strict-mode SFC will be `undefined`, not the element.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
In all of React 0.13, 0.14, 15, and 16, this bug exists.
While the bug ideally will be fixed, I understand that it's highly unlikely that it would be backported to the 14/15 lines - but I can wrap around it if there's a reliable way, in those versions, to distinguish SFCs from create-react-class components (is there?).
|
https://github.com/facebook/react/issues/13141
|
https://github.com/facebook/react/pull/13144
|
6731bfbed7964fdcb9b0080bce3edefc2a65d196
|
c039c16f21d7dd5172a3f46d65a4f484543a14ec
| 2018-07-03T07:38:43Z |
javascript
| 2018-07-03T16:47:40Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,130 |
["packages/react/src/ReactElementValidator.js", "packages/react/src/__tests__/ReactElementValidator-test.internal.js"]
|
Add a more helpful message when passing an element to createElement() as a type
|
This:
```js
createElement(<div />)
```
doesn't currently give a distinguishable message.
https://stackoverflow.com/questions/51110436/wrapping-provider-in-same-component-throws-element-type-is-invalid-expected-a-s
But we can easily detect it by checking for `$$typeof` and in that case suggest something more concrete (e.g. "Did you accidentally export JSX instead of a component?").
|
https://github.com/facebook/react/issues/13130
|
https://github.com/facebook/react/pull/13131
|
28cd494bdfcae0282e596211e982e120f60168f9
|
c44c2a21614ed2e5d3078dcb24dc7ef086df24be
| 2018-06-30T00:13:22Z |
javascript
| 2018-08-01T17:45:08Z |
closed
|
facebook/react
|
https://github.com/facebook/react
| 13,027 |
["packages/react-test-renderer/src/ReactShallowRenderer.js", "packages/react-test-renderer/src/__tests__/ReactShallowRenderer-test.js"]
|
Shallow renderer is not handling getDerivedStateFromProps properly
|
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
After using enzyme's `setState`, `getDerivedStateFromProps` is called with an older version of state.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
```jsx
import { shallow } from 'enzyme';
class Demo extends Component {
static getDerivedStateFromProps(props, state) {
return { value: state.value };
};
state = { value: 'old' };
render() {
return <div />;
}
}
const wrapper = shallow(<Demo />);
wrapper.setState({ value: 'new' });
assert(wrapper.state().value === 'new'); // this throws
```
While I don't have a standalone demo, I tracked the problem to the `_updateStateFromStaticLifecycle` method of `ReactShallowRenderer`. Inside of it `getDerivedStateFromProps` is called with `this._instance.state`, but it should be called with `this._newState`. This might be related to the change in when `getDerivedStateFromProps` is being called.
**What is the expected behavior?**
```jsx
assert(wrapper.state().value === 'new'); // this doesn't throw
```
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
[email protected]
[email protected]
[email protected]
|
https://github.com/facebook/react/issues/13027
|
https://github.com/facebook/react/pull/13030
|
392530104c00c25074ce38e1f7e1dd363018c7ce
|
945fc1bfce5f2a93ac6ff0c53da3fd57e81b5a63
| 2018-06-12T15:54:07Z |
javascript
| 2018-06-12T22:36:50Z |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.