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
19,810
["packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js", "packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js"]
Bug: eslint-plugin-react-hooks "Cannot read property parent of null"
This seems to happen when 1. I take a component as a prop 2. I use that component as a JSX constructor in a hook Minimal repro: ```jsx export const Foo = ({ Component }) => { React.useEffect(() => { console.log(<Component />); }, []); }; ``` ``` "eslint-plugin-react-hooks": "^4.1.1", ``` --- Interestingly, this does NOT cause the error: ```jsx export const Foo = ({ component }) => { React.useEffect(() => { const Component = component; console.log(<Component />); }, []); }; ```
https://github.com/facebook/react/issues/19810
https://github.com/facebook/react/pull/19815
84558c61ba1e511768e4f775fcf9c7af3a339caf
0f70d4dd667d8c953aaf8b0d40f6a0439cd4ab27
2020-09-11T04:22:06Z
javascript
2020-09-11T12:13:43Z
closed
facebook/react
https://github.com/facebook/react
19,748
["packages/react-reconciler/src/__tests__/ReactLazy-test.internal.js", "packages/react/src/ReactElementValidator.js", "packages/react/src/__tests__/ReactElementJSX-test.js", "packages/react/src/__tests__/ReactElementValidator-test.internal.js", "packages/react/src/__tests__/ReactJSXElementValidator-test.js", "packages/react/src/jsx/ReactJSXElementValidator.js"]
Bug: (17.0.0-rc.1) lazy is eager in dev mode
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> React version: 17.0.0-rc.1 ## Steps To Reproduce 1. Create elements out of `lazy` components, use them conditionally. 2. Check if the `lazy` components are dynamically imported. <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Issues without reproduction steps or code examples may be immediately closed as not actionable. --> Link to code example: -- `main.jsx`: ```jsx import React, { lazy, Suspense, useState } from 'react'; import { render } from 'react-dom'; const Checked = lazy(() => import('./Checked')); const Checked2 = lazy(() => import('./Checked2')); const Unchecked = lazy(() => import('./Unchecked')); const Unchecked2 = lazy(() => import('./Unchecked2')); function App() { const [checked, setChecked] = useState(false); const checkedElement = <Checked />; const uncheckedElement = <Unchecked />; return ( <> <label> <input type="checkbox" checked={checked} onChange={e => setChecked(e.target.checked)} /> Toggle me </label> <hr /> <Suspense fallback="loading..."> Checked? {checked ? checkedElement : uncheckedElement} </Suspense> <hr /> <Suspense fallback="loading..."> Checked? {checked ? <Checked2 /> : <Unchecked2 />} </Suspense> </> ); } render(<App />, document.getElementById('app')); ``` `Checked.jsx`: ```jsx export default function() { return 'Checked'; } ``` `Checked2.jsx`: ```jsx export default function() { return 'Checked 2'; } ``` `Unchecked.jsx`: ```jsx export default function() { return 'Unchecked'; } ``` `Unchecked2.jsx`: ```jsx export default function() { return 'Unchecked 2'; } ``` <!-- Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve. --> ## The current behavior The `Checked.jsx` chunk is imported eagerly, even though the component isn't immediately rendered. ![image](https://user-images.githubusercontent.com/567105/91972475-b039e580-ed12-11ea-96a4-8c7dc6ee5388.png) This doesn't happen in prod mode, or with React 16, or with components that are not `createElement`-ed eagerly. This affects react-router, as it uses this pattern: ```jsx <Router> <Suspense fallback={<Loading />}> <Switch> <Route exact path="/"> <Home /> </Route> <Route exact path="/demo"> <Demo /> </Route> <Route> <NotFound /> </Route> </Switch> </Suspense> </Router> ``` AFAICT it doesn't break anything, but it is unexpected/confusing. ## The expected behavior `lazy` components that are not rendered should not be dynamically imported.
https://github.com/facebook/react/issues/19748
https://github.com/facebook/react/pull/19871
a774502e0ff2a82e3c0a3102534dbc3f1406e5ea
bc6b7b6b16f771bfc8048fe15e211ac777253b64
2020-09-02T10:59:01Z
javascript
2020-09-21T15:04:49Z
closed
facebook/react
https://github.com/facebook/react
19,742
["packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js"]
Bug: Types incorrectly identified as missing dependencies for `[email protected]` with `@typescript-eslint/[email protected]`
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> React version: `16.13.1` (although this is related to the eslint plugin). ## Steps To Reproduce 1. Install `[email protected]` with `@typescript-eslint/[email protected]` in a TypeScript project. 2. Within your hook define a type, or cast a value to a certain type` ```tsx const actions = useMemo( () => bindActionCreators(MultishiftActions, dispatch) as Partial<Item>, [dispatch], ); ``` 3. `eslint-plugin-react-hooks` responds with this error `React Hook useMemo has a missing dependency: Item. Either include it or remove the dependency array.` <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Issues without reproduction steps or code examples may be immediately closed as not actionable. --> Link to code example: remirror/remirror/pull/619 - Checkout the remirror codebase ```bash git clone https://github.com/remirror/remirror git checkout typedoc ``` - Install the dependencies with `pnpm`. To setup `pnpm ` run `npm i -g pnpm`. - Run the command `pnpm run lint:es` to lint the codebase. <!-- Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve. --> ## The current behavior Types are identified as missing dependencies within a hook and [CI fails](https://github.com/remirror/remirror/pull/619/checks?check_run_id=1058210430). ## The expected behavior Types shouldn't be identified as missing dependencies.
https://github.com/facebook/react/issues/19742
https://github.com/facebook/react/pull/19751
a08ae9f147a716520a089055e2dec8f5397a4b0f
cd75f93c03a15d00f0f82f52587f110d6fba7216
2020-09-01T21:07:30Z
javascript
2020-09-10T10:30:18Z
closed
facebook/react
https://github.com/facebook/react
19,726
["packages/react-devtools-shared/src/__tests__/__snapshots__/inspectedElementContext-test.js.snap", "packages/react-devtools-shared/src/__tests__/inspectedElementContext-test.js", "packages/react-devtools-shared/src/__tests__/legacy/__snapshots__/inspectElement-test.js.snap", "packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js", "packages/react-devtools-shared/src/hydration.js", "packages/react-devtools-shared/src/utils.js"]
Bug: DevTools calls arbitrary generators which may be stateful
```js function foo*() { yield 1; yield 2; } let gen = foo() ``` Currently if you put `gen` into state or props and then open this component in DevTools, it will consume that generator while trying to format it. So `gen.next()` will give you `{ done: true }` next time you call it. This happens here: https://github.com/facebook/react/blob/60ba723bf78b9a28f60dce854e88e206fab52301/packages/react-devtools-shared/src/utils.js#L616-L623 I think that maybe we should treat iterables differently if they *return themselves* as an iterator. Since that means they're likely stateful and it's not ok to iterate over them. We detect iterables here (DevTools terminology is wrong btw, it should be `iterable` rather than `iterator`): https://github.com/facebook/react/blob/60ba723bf78b9a28f60dce854e88e206fab52301/packages/react-devtools-shared/src/utils.js#L438-L439 I think maybe we could split this into `iterable` and `opaque_iterable`, and make sure none of the codepaths attempt to traverse `opaque_iterable` or pass it to something that would consume it (e.g. `Array.from`). We could detect it based on `data[Symbol.iterator]() === data` — that clearly signals the iterable is its own iterator (which is the case for generators), and therefore it's not OK for DevTools to consume it. Maybe some other heuristic could work. But overall, the goal is that `Map` and friends is still being iterated over, but an arbitrary generator is not.
https://github.com/facebook/react/issues/19726
https://github.com/facebook/react/pull/19831
81aaee56afba2bb3558f2aaa484b594f23b59d4c
92c7e49895032885cffaad77a69d71268dda762e
2020-08-30T01:03:14Z
javascript
2020-09-22T18:23:20Z
closed
facebook/react
https://github.com/facebook/react
19,674
["packages/react-devtools-shared/src/__tests__/utils-test.js", "packages/react-devtools-shared/src/utils.js", "packages/react-is/src/ReactIs.js"]
Add SuspenseList to DevTools Element Names
https://github.com/facebook/react/blob/49af88991c3a3e79e663e495458fad12d3162894/packages/react-devtools-shared/src/utils.js#L491 We have SuspenseList for the tree view but not when printing JSX. When we fallthrough here we call getDisplayName with a symbol, because we assume that if it's not a string, then it's a function. We should be checking whether it is a function before calling getDisplayName. Subsequently if we call getDisplayName with a symbol we get the error `invalid value used as weak map key` which messes up things after that. I think that's the actual cause of https://github.com/facebook/react/pull/19364
https://github.com/facebook/react/issues/19674
https://github.com/facebook/react/pull/19684
5564f2c95bb61b446f93dc5c519740bdb39e1989
60ba723bf78b9a28f60dce854e88e206fab52301
2020-08-21T22:09:50Z
javascript
2020-08-26T17:04:43Z
closed
facebook/react
https://github.com/facebook/react
19,662
["packages/react-devtools-shared/src/devtools/views/Components/EditableValue.css", "packages/react-devtools-shared/src/devtools/views/Components/EditableValue.js"]
Add a toggle for Boolean props in DevTools
We previously had a feature where Boolean props would show a checkbox to the left of them in the DevTools pane. It was removed when the JSON editor was added, but I think we should add it back. It should work like this: 1. If the value is a boolean, the checkbox should show up to the left of `true` / `false` value 2. If it's no longer a boolean (e.g. gets edited manually), the checkbox disappears
https://github.com/facebook/react/issues/19662
https://github.com/facebook/react/pull/19714
99cae887f3a8bde760a111516d254c1225242edf
835c11eba713ea836af6dae67b4d0e835c0eabdf
2020-08-20T16:54:00Z
javascript
2020-09-03T12:57:12Z
closed
facebook/react
https://github.com/facebook/react
19,661
["package.json", "packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js", "packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js", "packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js", "scripts/eslint-rules/no-production-logging.js", "yarn.lock"]
Bug: eslint-plugin-react-hooks optional chaining in deps
**Packages** * `"react": "^16.13.1"` * `"eslint-plugin-react-hooks": "^4.0.8"` The issue #18819 still happens with `[email protected]`. Using the example code from the other issue gives the following errors: ![image](https://user-images.githubusercontent.com/37122343/90794940-59d9a980-e305-11ea-9ec0-98f69b41c280.png) ![image](https://user-images.githubusercontent.com/37122343/90795019-770e7800-e305-11ea-92b8-b64407b0b22c.png)
https://github.com/facebook/react/issues/19661
https://github.com/facebook/react/pull/19680
a8500be893acbaaecb44bced3fbdcd2d0c356ef7
1396e4a8f5646f35929883cbb449d2c83e7cbc79
2020-08-20T15:52:59Z
javascript
2020-08-29T20:03:23Z
closed
facebook/react
https://github.com/facebook/react
19,639
["packages/react-devtools-shared/src/devtools/views/Components/KeyValue.css"]
Bug: Property list does not render repeated spaces properly.
It looks like the property inspector inside React DevTools is not rendering repeating spaces properly. I imagine this can result in some fairly frustrating debugging sessions when doing something like string matching 😄 ## Steps To Reproduce 1. Create a component that takes a string as a property. 2. Pass multiple spaces in a row to that property `name={'Testing[3 spaces]One Two'}` (I would type the actual spaces, but it appears Github truncates the extra spaces even inside the code snippet!) 3. Inspect that element inside React DevTools. ## The current behavior The value of the prop `name` is rendered as `Testing One Two` ## The expected behavior The value of the prop `name` should be rendered as `Testing[3 spaces]One Two` --- Below are some screenshots of the behavior I'm seeing in production. Here's how the property value is rendered in inspector when it is output directly to the HTML: ![image](https://user-images.githubusercontent.com/424093/90543915-57841d80-e154-11ea-9151-6b9bd79b4c93.png) And here is how that same value is rendered inside DevTools: ![image](https://user-images.githubusercontent.com/424093/90543947-636fdf80-e154-11ea-849b-77fea6cd0c5a.png)
https://github.com/facebook/react/issues/19639
https://github.com/facebook/react/pull/19640
23595ff593b2e53ddfec2a08e848704d15d84b51
c45a195429b238587357f71a0e487dd80ed7c59f
2020-08-18T17:13:11Z
javascript
2020-08-19T12:50:46Z
closed
facebook/react
https://github.com/facebook/react
19,633
["packages/react-devtools-shared/src/__tests__/__snapshots__/storeComponentFilters-test.js.snap", "packages/react-devtools-shared/src/__tests__/storeComponentFilters-test.js", "packages/react-devtools-shared/src/backend/renderer.js"]
Error: "Commit tree does not contain fiber 2094. This is a bug in React DevTools."
Describe what you were doing when the bug occurred: 1. recorded profiling results 2. browsing results by paging to the right 3. crash --------------------------------------------- Please do not remove the text below this line --------------------------------------------- DevTools version: 4.8.2-fed4ae024 Call stack: at updateTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17854:21) at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17717:25) at ProfilingCache.getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:18265:14) at CommitFlamegraphAutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:31718:33) at vh (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11067:7) at fi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11733:7) at ck (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:14430:86) at bk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13779:11) at ak (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13768:5) at Sj (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13750:7) Component stack: at CommitFlamegraphAutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:31701:48) at div at div at div at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26139:23) at Profiler_Profiler (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33363:48) at ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:27172:5) at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:27303:32) at div at div at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30463:23) at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22538:23) at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23040:27) at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:28328:23) at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33797:21)
https://github.com/facebook/react/issues/19633
https://github.com/facebook/react/pull/19987
7559722a865e89992f75ff38c1015a865660c3cd
e614e6965749c096c9db0e6ad2844a2803ebdcb6
2020-08-18T07:14:13Z
javascript
2020-10-13T17:38:58Z
closed
facebook/react
https://github.com/facebook/react
19,629
["packages/react-devtools-extensions/popups/shared.js"]
Bug: Clicking the troubleshooting instructions button on the devtools opens 2 tabs
<!-- In the react devtools window, clicking the troubleshooting instructions link opens 2 tabs of the troubleshooting page, instead of once --> React version: Devtools 4.8.2 Firefox version: 79.0 64-bit ## Steps To Reproduce 1. Go to a non-react page 2. Open the devtools box 3. Click troubleshooting instructions ## The current behavior Opens 2 tabs of the github page ## The expected behavior Should open 1 tab of the github page
https://github.com/facebook/react/issues/19629
https://github.com/facebook/react/pull/19632
ee409ea3b577f9ff37d36ccbfc642058ad783bb0
24f1923b1b55f142c39364c88a57b2a1b90d3972
2020-08-17T17:28:59Z
javascript
2020-08-18T14:17:00Z
closed
facebook/react
https://github.com/facebook/react
19,602
["packages/react-devtools-shared/src/backend/renderer.js"]
Error: "getCommitTree(): Unable to reconstruct tree for root "1" and commit 21"
Describe what you were doing when the bug occurred: 1. I was going through the profiler result to check each render and what triggered each render --------------------------------------------- Please do not remove the text below this line --------------------------------------------- DevTools version: 4.8.2-fed4ae024 Call stack: at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17728:9) at ProfilingCache.getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:18265:14) at CommitFlamegraphAutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:31718:33) at vh (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11067:7) at fi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11733:7) at ck (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:14430:86) at bk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13779:11) at ak (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13768:5) at Sj (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13750:7) at Mj (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13351:105) Component stack: at CommitFlamegraphAutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:31701:48) at div at div at div at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26139:23) at Profiler_Profiler (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33363:48) at ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:27172:5) at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:27303:32) at div at div at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30463:23) at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22538:23) at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23040:27) at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:28328:23) at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33797:21)
https://github.com/facebook/react/issues/19602
https://github.com/facebook/react/pull/21377
a5267faad5849eb3d10ead6be911f661691e0345
a0d6b155dc3a182162b9f91baac33df39d7919df
2020-08-13T12:28:03Z
javascript
2021-04-28T14:29:22Z
closed
facebook/react
https://github.com/facebook/react
19,594
["packages/react-devtools-extensions/src/main.js"]
Chrome DevTools tab icon doesn't match screenshots on webstore
## The current behavior React logo in the tab is extremely small & indecipherable <img width="176" alt="Screen Shot 2020-08-12 at 5 54 27 PM" src="https://user-images.githubusercontent.com/157270/90082546-e3192c80-dcc4-11ea-81e0-f53cd86f6bda.png"> ## The expected behavior Should be as [shown here](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi) ![image](https://user-images.githubusercontent.com/157270/90082581-f926ed00-dcc4-11ea-9140-f7b10150c82d.png)
https://github.com/facebook/react/issues/19594
https://github.com/facebook/react/pull/19603
ccb6c39451b502c6b3ff3c014962827c54bae548
c3ee973c5604078d5e9645a7e50db1842939d1e0
2020-08-13T00:55:22Z
javascript
2020-08-13T15:16:35Z
closed
facebook/react
https://github.com/facebook/react
19,591
["scripts/rollup/wrappers.js"]
Bug: 'use strict' at global level causes issues with scripts concatenation.
React version: 16.13.1 Even though React's code (and other packages like ReactDOM) are wrapped in a IIFE, the code applies an **entire script** strict mode by placing a **'use strict' before any other statement**: https://cdnjs.cloudflare.com/ajax/libs/react/16.13.1/umd/react.production.min.js https://cdnjs.cloudflare.com/ajax/libs/react/16.13.1/umd/react.development.js https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.13.1/umd/react-dom.production.min.js https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.13.1/umd/react-dom.development.min.js MDN mentions the "trap" of concatenating conflicting scripts strict mode when using the entire script strict mode, see [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#Strict_mode_for_scripts). ## Steps To Reproduce 1. Create a file with React's code **at the top** and concat an expression that causes a 'use strict' violation 2. Load this file as a script tag Link to code example: https://stackblitz.com/edit/use-strict-react?file=index.js (Scroll to bottom of file to see the concatenated expressions) ## The current behavior 'use strict' mode is enforced on all the concatenated code, even if it was not defined as 'strict'. As a result, 'strict' violations at the other concatenated libraries will now **throw** errors (instead of silencing them), causing the script to stop execution. ## The expected behavior Global 'use strict' should not be used and should be replaced with function scope strict mode (which already exist in some cases of React IIFE bundles code wrappers, like `react-dom.development`). ## Misc info * https://github.com/facebook/react/pull/10933 - Always wrap UMD bundles in IIFEs * https://github.com/facebook/react/blob/master/scripts/rollup/build.js#L104 - `closure` options for the build script stating `language_out: 'ECMASCRIPT5_STRICT'` * https://developers.google.com/closure/compiler/docs/api-ref - `ECMASCRIPT5_STRICT` explained (vs `ECMASCRIPT5`)
https://github.com/facebook/react/issues/19591
https://github.com/facebook/react/pull/19614
ffb749c95e0361b3cfbbfc4e1a73bfa2fda0aa93
49cd77d24a5244d159be14671654da63932ea9be
2020-08-12T08:50:57Z
javascript
2020-08-15T13:42:49Z
closed
facebook/react
https://github.com/facebook/react
19,562
["packages/react-dom/src/__tests__/ReactDOMFiber-test.js", "packages/react-dom/src/events/plugins/EnterLeaveEventPlugin.js"]
Bug: mouseEnter fires twice in react@next
React version: 0.0.0-f77c7b9d7 Browser: Chrome Version 84.0.4147.105 (Official Build) (64-bit) OS: Ubuntu 18.04.4 LTS ## Steps To Reproduce 1. move mouse over button Link to code example: https://codesandbox.io/s/mouseenter-in-reactnext-ibld3?file=/src/Demo.js ## The current behavior `onMouseEnter` fires twice (sometimes it doesn't). ![video capture of repro steps](https://i.ibb.co/XzdQF68/react-next-mouseenter-twice.gif) ## The expected behavior It fires only once. Same repro with `[email protected]`: https://codesandbox.io/s/mouseenter-in-react16131-9sr7b?file=/src/Demo.js
https://github.com/facebook/react/issues/19562
https://github.com/facebook/react/pull/19571
aa99b0b08e355fbbff3aaf6568d89b7a9c0e9705
94c0244bab7515c9b2c00b8e5312a9b6f31ef13a
2020-08-08T10:25:23Z
javascript
2020-08-10T14:08:22Z
closed
facebook/react
https://github.com/facebook/react
19,558
["packages/react-dom/src/client/ReactDOMComponent.js"]
Bug: In react@next ShadowRoot as rootElement in ReactDOM.render crashes
React version: 0.0.0-f77c7b9d7 ## Steps To Reproduce 1. Mount a component with even listeners in a `ShadowRoot` Link to code example: - [codesandbox with `react@next`](https://codesandbox.io/s/next-shadowroot-as-root-element-pkktc) (crashes) - [codesandbox with `[email protected]`](https://codesandbox.io/s/16-shadowroot-as-root-element-m74ob) (mounts without errors/warnings) ## The current behavior Throws with > ensureListeningTo(): received a container that was not an element node. This is likely a bug in React. ## The expected behavior 1. throw with a descriptive error that ShadowRoot is no longer supported as a root element or 2. continue to allow ShadowRoot as a root element No preference here. This was just from an old regression test we had. Will be fixed by https://github.com/facebook/react/pull/15894
https://github.com/facebook/react/issues/19558
https://github.com/facebook/react/pull/15894
e4afb2fddf6d1c596c703c384303a35d4d0d830f
1287670191e8e3bb193c83c18e587ccb8159a4ba
2020-08-07T21:30:44Z
javascript
2020-08-17T14:47:49Z
closed
facebook/react
https://github.com/facebook/react
19,548
["packages/react-dom/src/__tests__/ReactEmptyComponent-test.js", "packages/react-reconciler/src/ReactChildFiber.new.js", "packages/react-reconciler/src/ReactChildFiber.old.js"]
Bug: HOC (memo/forwardRef) should throw for noop function
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> React version: v16 ## Steps To Reproduce ```js import React from "react"; export const Q = React.memo(() => {}); export const Z = React.forwardRef(() => {}); export default function App() { return ( <> <Q /> <Z /> </> ); } ``` Link to code example: https://codesandbox.io/s/hoc-throw-null-xrhwg ## The current behavior No errors. ## The expected behavior > Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.
https://github.com/facebook/react/issues/19548
https://github.com/facebook/react/pull/19550
32ff4286872d1a6bb8ce71730064f60ebbdd1509
a63893ff320c39802e8c37fca84ea023f55230c9
2020-08-06T15:43:15Z
javascript
2020-08-06T20:12:32Z
closed
facebook/react
https://github.com/facebook/react
19,545
["packages/react-devtools-extensions/src/backend.js", "packages/react-devtools-shared/src/__tests__/__snapshots__/inspectedElementContext-test.js.snap", "packages/react-devtools-shared/src/__tests__/inspectedElementContext-test.js", "packages/react-devtools-shared/src/hydration.js", "packages/react-devtools-shared/src/utils.js"]
Bug: Proxy on Context throws an error in DevTools
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> React version: 16.12.0 ## Steps To Reproduce 1. Create an app with a `Proxy` function that has a `get` method that returns a function stored in Context 2. Attempt to look at Provider component in devtools <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Issues without reproduction steps or code examples may be immediately closed as not actionable. --> Link to code example: https://codesandbox.io/s/stoic-jepsen-7jjfn?file=/src/App.js https://7jjfn.csb.app/ <!-- Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve. --> ## The current behavior When using the devtools to inspect the `Context.Provider`, devtools throw an error: ``` Uncaught DOMException: Failed to execute 'postMessage' on 'Window': function () { return null; } could not be cloned. ``` Components using the context do not show info in devtools and show "Loading..." instead. ## The expected behavior No error is thrown. ## Possibly Related #16691
https://github.com/facebook/react/issues/19545
https://github.com/facebook/react/pull/19584
b8ed6a1aa580e4de80f707293015d638d3252d63
b6e1d086043a801682ff01b00c7a623d529b46c0
2020-08-06T14:50:25Z
javascript
2020-08-12T16:15:53Z
closed
facebook/react
https://github.com/facebook/react
19,362
["packages/scheduler/src/Scheduler.js", "packages/scheduler/src/__tests__/Scheduler-test.js"]
Scheduler callback is only checked for null value and therefore throws when callback is undefined.
https://github.com/facebook/react/blob/30b47103d4354d9187dc0f1fb804855a5208ca9f/packages/scheduler/src/Scheduler.js#L180-L185
https://github.com/facebook/react/issues/19362
https://github.com/facebook/react/pull/19412
d93c8faadac0a1cea4ba2a3c1333e78314a6e61a
b55f75d0a5383a60085e051d19b62ae68d71e366
2020-07-15T09:32:19Z
javascript
2020-07-24T18:34:16Z
closed
facebook/react
https://github.com/facebook/react
19,320
["packages/react-devtools-shared/src/__tests__/__snapshots__/profilingCache-test.js.snap", "packages/react-devtools-shared/src/__tests__/profilingCache-test.js", "packages/react-devtools-shared/src/backend/renderer.js", "packages/react-devtools-shell/src/app/SuspenseTree/index.js"]
Bug: DevTools extension component tree view crashes on empty Suspense element
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> React version: 16.13.1 (also tested with versions down to 16.9.0) DevTools extension version: 4.8.1 (Firefox), 4.8.0 (Chrome) ## Steps To Reproduce 1. Create a new app using `create-react-app` 2. Replace the contents of `App.js` with this: ```jsx import React, { Suspense } from "react"; function App() { return <Suspense></Suspense>; } export default App; ``` ## The current behavior The component tree renders up until the empty `<Suspense>` element, and an error is printed to the console. Example from a production app: ![image](https://user-images.githubusercontent.com/1078076/87224862-15afcc80-c389-11ea-95da-aa102333befe.png) Error stack trace (more or less same as in Chrome): ``` Uncaught TypeError: e.child is null Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1029 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1029 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1029 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 Me moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1020 flushInitialOperations moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1262 flushInitialOperations moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1257 o moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:2068 emit http://localhost:8080/4301/superreports/1359398:1 emit http://localhost:8080/4301/superreports/1359398:1 i moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:2075 y moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:2076 y moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:2076 e moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1776 e moz-extension://3b85dd64-f11d-4480-a0a9-2f6ad211ca37/build/react_devtools_backend.js:1779 ``` The line in question is this: ```javascript // Special case: if Suspense mounts in a timed-out state, // get the fallback child from the inner fragment and mount // it as if it was our own child. Updates handle this too. var u=e.child,c=u?u.sibling:null,s=c?c.child:null;null!==s&&Me(s,a?e:t,!0,r)}else{var f=-1===$?e.child:e.child.child;null!==f&&Me(f,a?e:t,!0,r)}else null!==e.child&&Me(e.child,a?e:t,!0,r); ``` Which points to this location in the source code: https://github.com/facebook/react/blob/30b47103d4354d9187dc0f1fb804855a5208ca9f/packages/react-devtools-shared/src/backend/renderer.js#L1221 ## The expected behavior I can view the component tree in React DevTools with no error.
https://github.com/facebook/react/issues/19320
https://github.com/facebook/react/pull/19337
d1f2143aa6f2bba622b244e296ccb89e1c6a7495
fbc63863692d291b50e55400673845f7c81aff61
2020-07-11T13:49:29Z
javascript
2020-07-13T20:21:56Z
closed
facebook/react
https://github.com/facebook/react
19,312
["packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js", "packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js"]
Bug: Exhaustive deps lint rule mistakingly flags an assignment
Example: ```js function Example(props) { useEffect(() => { let topHeight = 0; topHeight = props.upperViewHeight; }, [props.upperViewHeight]); } ``` This is **not** supposed to violate because `props.upperViewHeight` is in the deps.
https://github.com/facebook/react/issues/19312
https://github.com/facebook/react/pull/19313
d5d659062d156de67a62ed3fd11ad9c08034bfdc
47915fd6e1858e8d3434caff9588237448a00b3f
2020-07-10T17:41:51Z
javascript
2020-07-10T18:02:08Z
closed
facebook/react
https://github.com/facebook/react
19,308
["packages/react-devtools-shared/src/utils.js"]
Bug: Unexpected debugger statement in DevTools (solved)
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> Looks like you forgot about the debugger inside the react_devtools_backend.js. React dev tools version: 4.8.0 ## Steps To Reproduce 1. Update (or install) the latest version of devtools 2. Open devtools 3. The code will be stopped on the debugger inside react_devtools_backend.js ![IMAGE 2020-07-10 13:43:52](https://user-images.githubusercontent.com/20472264/87146286-6523c900-c2b3-11ea-892f-92c01d0a2412.jpg) ## The current behavior If I open devtools with react dev tools extension it will stop every time on debugger inside react_devtools_backend.js ## The expected behavior It doesn't seem like it should be happening 😃
https://github.com/facebook/react/issues/19308
https://github.com/facebook/react/pull/19309
14084be286d09df49d5410c751bc28f0180a54b2
8eaf05e0e835427c9231a6dd570c2819547959ac
2020-07-10T10:49:41Z
javascript
2020-07-10T13:11:32Z
closed
facebook/react
https://github.com/facebook/react
19,293
["scripts/jest/jest-cli.js"]
DevTools test script runs the wrong tests
```sh yarn test --build --project devtools ``` This doesn't actually run any DevTools tests. It runs the main React tests. Console output shows that it's choosing the wrong config: ```sh $ yarn test --build --project devtools $ node ./scripts/jest/jest-cli.js --build --project devtools $ NODE_ENV=development RELEASE_CHANNEL=experimental node ./scripts/jest/jest.js --config ./scripts/jest/config.build.js ``` I wonder if this is also happening for other targets?
https://github.com/facebook/react/issues/19293
https://github.com/facebook/react/pull/19295
a5b4492950130f13733cc0bfa0888970d93e5588
e760d1fb0fc38d9075131c384fb6eebe5cb43d8c
2020-07-09T14:29:56Z
javascript
2020-07-09T14:49:33Z
closed
facebook/react
https://github.com/facebook/react
19,279
["packages/react-devtools/package.json", "yarn.lock"]
Security: 4 Electron (react-devtools dep) security advisories
React version: `16.8.6` There were 4 security issues filed against `electron`, which `react-devtools` has as a dep. The lowest version that fixes all 4 is `7.2.4` but the version requirement of `electron` for `react-devtools` is `^5.0.0`. I freely admit that a good solution is to install `react-devtools` as a dev dependency, but for "reasons" that does not work for us. There are likely others out there in similar situations. * [Issue 1](https://github.com/advisories/GHSA-6vrv-94jv-crrg): low * [Issue 2](https://github.com/advisories/GHSA-h9jc-284h-533g): high * [Issue 3](https://github.com/advisories/GHSA-f9mq-jph6-9mhm): moderate * [Issue 4](https://github.com/advisories/GHSA-m93v-9qjc-3g79): high These were buried deep in the releases so I am including the links here: [Electron Changelog from 5 -> 6](https://github.com/electron/electron/releases?after=v7.0.0-nightly.20190730) [Electron Changelog from 6 -> 7](https://github.com/electron/electron/releases?after=v6.1.1) Thank you so much for any advice that you may be able to provide. Also thank you for all the work that you do. React, it's community, and it's ecosystem are awesome! 😎
https://github.com/facebook/react/issues/19279
https://github.com/facebook/react/pull/19280
6508ab3be8a4a79d18e46fac7318454307a51170
a5b4492950130f13733cc0bfa0888970d93e5588
2020-07-08T12:42:47Z
javascript
2020-07-09T14:13:26Z
closed
facebook/react
https://github.com/facebook/react
19,259
["packages/react-devtools-shared/src/devtools/ProfilerStore.js", "packages/react-devtools-shared/src/devtools/views/Profiler/CommitTreeBuilder.js", "packages/react-devtools-shared/src/devtools/views/Profiler/FlamegraphChartBuilder.js", "packages/react-devtools-shared/src/devtools/views/Profiler/types.js", "packages/react-devtools-shell/src/app/InspectableElements/CustomHooks.js"]
Suggestion: show HOC names in profiler
(Deleted template as this is a suggestion, not a bug.) The dev tools helpfully extracts HOC names and shows them in the components tree. [Example](https://react-devtools-tutorial.now.sh/higher-order-components): ![image](https://user-images.githubusercontent.com/921609/86582724-03ddbc00-bf7a-11ea-83fb-f9d0a3902e5f.png) However, it doesn't give the same treatment to components in the profiler: ![image](https://user-images.githubusercontent.com/921609/86582766-135d0500-bf7a-11ea-8e2a-520597150db6.png) In large trees, it is very confusing to see two components with the same name, so it would be useful to show the HOC name here as well. As a workaround for now, users can click through to the "components" tab from the profiler, when a component is selected in the profiler flamegraph, to see this extra information.
https://github.com/facebook/react/issues/19259
https://github.com/facebook/react/pull/19283
970fa122d8188bafa600e9b5214833487fbf1092
17efbf7d63f3e4abb75b65b9baecdfe1b84fb4d5
2020-07-06T10:17:15Z
javascript
2020-07-10T15:21:19Z
closed
facebook/react
https://github.com/facebook/react
19,243
["packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js", "packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js"]
Bug: Cannot read property 'references' of undefined in eslint-plugin-react-hooks v4.0.5
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> Certain code patterns using optional chaining syntax causes eslint-plugin-react-hooks to throw an error. React version: 16.10.2 ## Steps To Reproduce 1. Install eslint-plugin-react-hooks v4.0.5 2. Put this code in a file: ```tsx import React, { useEffect } from 'react'; export const Repro = (props) => { const foo = {}; const bar = () => ({ pizza: foo.pizza, pasta: foo?.pasta, }); useEffect(bar, []); return <div />; }; ``` <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Issues without reproduction steps or code examples may be immediately closed as not actionable. --> <!-- Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve. --> ## The current behavior ESLint throws the following error: ``` TypeError: Cannot read property 'references' of undefined Occurred while linting /path/to/repo/file.ts:102 at /path/to/repo/node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js:1681:23 at Set.forEach (<anonymous>) at visitFunctionWithDependencies (/path/to/repo/node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js:1672:29) at visitCallExpression (/path/to/repo/node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js:886:19) at /path/to/repo/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach (<anonymous>) at Object.emit (/path/to/repo/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/path/to/repo/node_modules/eslint/lib/linter/node-event-generator.js:254:26) at NodeEventGenerator.applySelectors (/path/to/repo/node_modules/eslint/lib/linter/node-event-generator.js:283:22) at NodeEventGenerator.enterNode (/path/to/repo/node_modules/eslint/lib/linter/node-event-generator.js:297:14) ``` ## The expected behavior ESLint does not throw an error. This looks related to https://github.com/facebook/react/issues/19043 and https://github.com/facebook/react/pull/19062. I've noticed that it does not throw if a number of slight variations are made to the code. The following do not throw: ```tsx import React, { useEffect } from 'react'; export const Repro = (props) => { const foo = {}; const bar = { pizza: foo.pizza, pasta: foo?.pasta, }; useEffect(bar, []); return <div />; }; ``` ```tsx import React, { useEffect } from 'react'; export const Repro = (props) => { const foo = {}; const bar = () => ({ pizza: foo?.pizza, pasta: foo?.pasta, }); useEffect(bar, []); return <div />; }; ``` ```tsx import React, { useEffect } from 'react'; export const Repro = (props) => { const foo = {}; const bar = () => ({ pizza: something.pizza, pasta: foo?.pasta, }); useEffect(bar, []); return <div />; }; ``` cc @krailler
https://github.com/facebook/react/issues/19243
https://github.com/facebook/react/pull/19260
670c0376ea29b0217b8cba5db5a07e238b461fbd
0f84b0f02b5579d780a9f54497007c4c84aaebb7
2020-07-02T16:02:21Z
javascript
2020-07-06T19:52:14Z
closed
facebook/react
https://github.com/facebook/react
19,211
["packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js", "packages/react-dom/src/server/ReactPartialRenderer.js", "packages/react-dom/src/server/ReactPartialRendererHooks.js"]
Bug: React hook state not cleared when rendering using ReactDOMServer if component errors
In the react-dom package, React maintains some global internal state for hooks when server rendering a component (https://github.com/facebook/react/blob/v16.13.1/packages/react-dom/src/server/ReactPartialRendererHooks.js#L44-L54). The state is reset after [each function component finishes rendering](https://github.com/facebook/react/blob/v16.13.1/packages/react-dom/src/server/ReactPartialRenderer.js#L535) via [the `finishHooks` function](https://github.com/facebook/react/blob/v16.13.1/packages/react-dom/src/server/ReactPartialRendererHooks.js#L197-L201). Since the state of the hooks are only reset after a component finishes rendering, we can observe incorrect hooks state if a component that was using hooks raised an error while rendering, thus causing the finishHooks call to never execute. The next function component to render within the same process would then use the hooks state from the Component that previously failed to render, potentially causing mismatches. We can work around this bug by rendering a no-op function component at the top of our react tree (which will cause `finishHooks` to properly run), but it seems like a more ideal fix would be to reset the hooks state as part of [the `prepareHooks` call](https://github.com/facebook/react/blob/v16.13.1/packages/react-dom/src/server/ReactPartialRendererHooks.js#L161-L173). The comments actually have the code already present -- maybe there is a good reason for the state not to be reset there? React version: 16.13.1 ## Steps To Reproduce Refer to the steps in the README of the example repo. Link to code example: https://github.com/pmaccart/react-hooks-ssr-state-leak ## The current behavior The hooks state of a component is not cleared between renders ## The expected behavior The hooks state of a component is cleared between renders
https://github.com/facebook/react/issues/19211
https://github.com/facebook/react/pull/19212
6fd43211350fe018dbe4b0871eaec6a5beb52b33
b85b47630be57c7031b0a9ab741cf858dc0ca215
2020-06-29T23:26:29Z
javascript
2020-07-08T02:10:23Z
closed
facebook/react
https://github.com/facebook/react
19,099
["packages/shared/ConsolePatchingDev.js"]
Bug: TypeError: "log" is read-only.
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> React version: 0.0.0-experimental-33c3af284 ![image](https://user-images.githubusercontent.com/5390719/84034123-7b94e700-a9cc-11ea-9668-def995e2a09b.png) https://github.com/facebook/react/blob/master/packages/shared/ConsolePatchingDev.js#L45 > // $FlowFixMe Flow thinks console is immutable. Yes it _is_ immutable in some enviroment. Please add a try catch on it.
https://github.com/facebook/react/issues/19099
https://github.com/facebook/react/pull/19123
6ba25b96df5d4179bf8aba3c3fe1ace3dce28234
5b98656909d46fff6da135a8e60ffdc529e432f5
2020-06-08T13:13:10Z
javascript
2020-06-23T14:34:53Z
closed
facebook/react
https://github.com/facebook/react
19,020
["packages/react-reconciler/src/ReactFiberBeginWork.new.js", "packages/react-reconciler/src/ReactFiberBeginWork.old.js", "packages/react-reconciler/src/__tests__/ReactNewContext-test.js", "packages/react-test-renderer/src/__tests__/ReactTestRenderer-test.internal.js", "packages/react-test-renderer/src/__tests__/ReactTestRendererTraversal-test.js", "packages/react/src/__tests__/ReactContextValidator-test.js"]
Feature request: have Context.Provider throw error if missing `value` prop
Just about every time I set up a new `Context.Provider`, I end up accidentally specifying a `values` prop rather than `value`. While it's a minor error, generally I build the container in which the provider resides and commit it to the code base before I ever use it. It's only later when I go to use it that I realize I did it again. Since the `Context.Provider` seems pretty much useless without a `value` prop specified, I'd love it if there was a prop error if it is missing... especially if another prop is defined on the `Context.Provider` instead.
https://github.com/facebook/react/issues/19020
https://github.com/facebook/react/pull/19054
47ff31a77add22bef54aaed9d4fb62d5aa693afd
f4097c1aef173ea0cb873bc18b47d1ef12bab4b3
2020-05-27T18:27:06Z
javascript
2020-06-30T18:50:55Z
closed
facebook/react
https://github.com/facebook/react
18,935
["packages/react-devtools-shared/src/devtools/views/ErrorBoundary.css", "packages/react-devtools-shared/src/devtools/views/ErrorBoundary.js", "packages/react-devtools-shared/src/devtools/views/Icon.js", "packages/react-devtools-shared/src/devtools/views/Profiler/Profiler.js", "packages/react-devtools-shared/src/devtools/views/Settings/SettingsContext.js", "packages/react-devtools-shared/src/devtools/views/portaledContent.js", "packages/react-devtools-shared/src/devtools/views/root.css"]
DevTools: Uncaught error doesn't go away on page refresh
1. Wait for devtools to hit an error (eg: #18934). 2. Reload the page. Expected: Devtools reinitializes cleanly. Actual: Error is still there. Need to hide devtools, reload _again_, then show devtools to get it to behave. DevTools version: 4.6.0-6cceaeb67
https://github.com/facebook/react/issues/18935
https://github.com/facebook/react/pull/18956
730ae7afa2a2f620a77490ad4e2fbcc98f326da2
099f73710e5aec28b9d86bc3a8fdb1cad5a9f490
2020-05-16T06:51:01Z
javascript
2020-05-21T18:21:22Z
closed
facebook/react
https://github.com/facebook/react
18,924
["packages/react-devtools-shared/src/__tests__/__snapshots__/storeComponentFilters-test.js.snap", "packages/react-devtools-shared/src/__tests__/storeComponentFilters-test.js", "packages/react-devtools-shared/src/backend/renderer.js"]
Error: "Could not find node with id "4557" in commit tree"
Describe what you were doing when the bug occurred: 1. Started profiling the application 2. Tried to stop it after couple of navigation and actions on spa, but failed to stop. 3. Finally clicking multiple times on Stop has stopped profiling, and got his issue in graph option --------------------------------------------- Please do not remove the text below this line --------------------------------------------- DevTools version: 4.6.0-6cceaeb67 Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:167472 at Map.forEach (<anonymous>) at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:167418) at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:167941) at lc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:342270) at ci (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59620) at Ll (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:109960) at qc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102381) at Hc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102306) at Vc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102171) Component stack: in lc in div in div in div in So in Unknown in n in Unknown in div in div in rl in Ze in fn in Ga in _s
https://github.com/facebook/react/issues/18924
https://github.com/facebook/react/pull/20019
c57fe4a2c1402acdbf31ac48cfc6a6bf336c4067
2eb3181eb4247077eafc4df98d06d7a999ecf5d8
2020-05-14T13:10:10Z
javascript
2020-10-15T18:45:23Z
closed
facebook/react
https://github.com/facebook/react
18,876
["packages/eslint-plugin-react-hooks/package.json"]
eslint-plugin-react-hooks peerDependency warning with [email protected]
## The current behavior [email protected] [has been released](https://github.com/eslint/eslint/releases/tag/v7.0.0) yesterday. `eslint-plugin-react-hooks` gets a peerDependency warning: ``` npm WARN [email protected] requires a peer of eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself. ``` ## The expected behavior Ensure compatibility with the newly released major and add to `peerDependencies`.
https://github.com/facebook/react/issues/18876
https://github.com/facebook/react/pull/18878
8b9c4d1688333865e702fcd65ad2ab7d83b3c33c
c3ff21e01bdf6269da222a3203392190d04de8d3
2020-05-09T12:52:55Z
javascript
2020-05-12T16:01:28Z
closed
facebook/react
https://github.com/facebook/react
18,859
["packages/react-devtools-shared/src/backend/agent.js", "packages/react-devtools-shared/src/backend/renderer.js"]
Error: "Commit tree already contains fiber "19587". This is a bug in React DevTools."
### Describe what you were doing when the bug occurred: 1. I did profiling on a list, that gets updated on each pagination api call. 2. Once the profiling was done, I moved around in the Profiler to view the Flamegraph 3. Moving to second capture, the Profiler crashed. **DevTools version**: 4.6.0-6cceaeb67 ``` Component stack: in ec in div in div in div in So in Unknown in n in Unknown in div in div in rl in Ze in fn in Ga in _s ```
https://github.com/facebook/react/issues/18859
https://github.com/facebook/react/pull/21432
e9a4a44aae675e1b164cf2ae509e438c324d424a
67ebdf88bfebb728f48d9842c479b4fac545a43d
2020-05-07T13:49:45Z
javascript
2021-05-05T02:28:17Z
closed
facebook/react
https://github.com/facebook/react
18,844
["packages/react-reconciler/src/ReactFiberBeginWork.new.js", "packages/react-reconciler/src/ReactFiberBeginWork.old.js", "packages/react-reconciler/src/ReactFiberThrow.new.js", "packages/react-reconciler/src/ReactFiberThrow.old.js", "packages/react-reconciler/src/ReactSideEffectTags.js", "packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js"]
Bug: Render after suspense is thrown away leaving DOM unmatched with state
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> React version: 16.12.0 ## Steps To Reproduce A component that suspends as a result of a context update is never rendered to DOM after suspension is finished. <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Issues without reproduction steps or code examples may be immediately closed as not actionable. --> Link to code example: https://codesandbox.io/s/react-suspense-context-bug-rklls?file=/package.json:163-170 <!-- Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve. --> ## The current behavior If a component suspends as a result of a context update, the component's render is called after suspension is finished but the result of the render is not reflected in the DOM (and effects aren't called). ## The expected behavior If a component suspends as a result of a context update, the component's render should be called and flushed to the DOM and effects called. ## Related Issues: https://github.com/facebook/react/issues/17356 - seems related to memoization but this does not use any memoization
https://github.com/facebook/react/issues/18844
https://github.com/facebook/react/pull/19216
f4097c1aef173ea0cb873bc18b47d1ef12bab4b3
8bff8987e513486bb96018b80d7edb02d095ed06
2020-05-06T16:31:08Z
javascript
2020-06-30T21:06:46Z
closed
facebook/react
https://github.com/facebook/react
18,828
["packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js", "packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js"]
Bug [ESLint Hooks Plugin]: When using a `typeof` type guard it requires the value as a dependency
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> **Version:** [email protected] ## Steps To Reproduce 1. Create a component with local state 2. Create a useEffect with a variable inside, that points to the `typeof` of the state variable <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Issues without reproduction steps or code examples may be immediately closed as not actionable. --> Link to code example: https://codesandbox.io/s/nervous-williamson-2i99l?file=/src/App.tsx:210-261 ## The current behavior `react-exhaustive-deps` complains that the state variable should be included in the dependency list ## The expected behavior `react-exhaustive-deps` shouldn't complain that the state variable should be included in the dependency list because it's value is never used.
https://github.com/facebook/react/issues/18828
https://github.com/facebook/react/pull/19316
26472c88979bb60746a47a660415df80775d25f9
84479046f789be7ae19b410df4c6041e25a31a55
2020-05-05T13:33:32Z
javascript
2020-07-13T16:57:00Z
closed
facebook/react
https://github.com/facebook/react
18,823
["packages/react-reconciler/src/ReactFiberHooks.new.js", "packages/react-reconciler/src/ReactFiberHooks.old.js", "packages/react-reconciler/src/__tests__/useMutableSource-test.internal.js"]
useMutableSource: allow getSnapshot to return a function
Ref: https://github.com/reactjs/rfcs/pull/147#issuecomment-623740218 React version: 0.0.0-experimental-e5d06e34b ## Steps To Reproduce 1. createMutableSource that contains functions 2. getSnapshot returns one of the functions Link to code example: https://codesandbox.io/s/jovial-dew-1eg4t?file=/src/App.js ## The current behavior If getSnapshot returns a function, it will run the function in render. This results in various errors. My workaround: return an object wrapping a function, and destruct on caller. > For now, you can work around this by returning a function that returns your function I don't know how this works as workaround. ## The expected behavior It would be nice if returning a function just works. Note: this is not a rare use case in my library https://github.com/dai-shi/use-context-selector because we often pass `[state, setState]` in a context value.
https://github.com/facebook/react/issues/18823
https://github.com/facebook/react/pull/18933
142d4f1c00c66f3d728177082dbc027fd6335115
8f4dc3e5d005459058ed7ffc26c2fb76b845ce62
2020-05-04T23:34:25Z
javascript
2020-05-21T23:14:29Z
closed
facebook/react
https://github.com/facebook/react
18,819
["packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js", "packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js"]
Bug: eslint-plugin-react-hooks cannot use optional chaining in deps
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> React version: 16.3.1 eslint-plugin-react-hooks version: 4.0.0 ## Steps To Reproduce Use ?. in dependency to any of the react hooks. ``` export default function App() { const x = Date.now() % 2 === 0 ? { test: true } : undefined; React.useEffect(() => { if (x?.test) { console.log('test'); } }, [x?.test]); return ( <div className="App"> <h1>Hello CodeSandbox</h1> </div> ); } ``` <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Issues without reproduction steps or code examples may be immediately closed as not actionable. --> Link to code example: I was unable to reproduce the behavior in codesandbox, it must be transforming the code or stripping out the ? before linting. It happens in VS Code. <!-- Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve. --> ## The current behavior eslint errors occur: React Hook React.useEffect has a missing dependency: 'x'. Either include it or remove the dependency array.eslintreact-hooks/exhaustive-deps React Hook React.useEffect has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked.eslintreact-hooks/exhaustive-deps ![image](https://user-images.githubusercontent.com/319334/81008656-25021f00-8e08-11ea-8f91-5c533671d75a.png) ## The expected behavior I would expect it to work just like it does currently for non-optional child member access. ![image](https://user-images.githubusercontent.com/319334/81008703-36e3c200-8e08-11ea-8aa9-56df8ccf9531.png) When ? is removed, it no longer shows eslint errors, but obviously would fail at runtime if x is undefined.
https://github.com/facebook/react/issues/18819
https://github.com/facebook/react/pull/18820
e028ce2ab7fbecb30d23cd34e91553ccbeb7bb8e
7992ca10df497002e0e91bb5bfbc9661c9c85b88
2020-05-04T20:08:59Z
javascript
2020-05-05T12:53:42Z
closed
facebook/react
https://github.com/facebook/react
18,798
["packages/react-devtools-shared/src/__tests__/__snapshots__/profilingCache-test.js.snap", "packages/react-devtools-shared/src/devtools/views/Profiler/utils.js"]
Error: "Cannot read property 'duration' of undefined"
Describe what you were doing when the bug occurred: 1. Add interaction tracing with unstable_trace 2. Record a profile, navigate to Profiler > Profiled Interactions 3. Error appears when scrolling view or immediately ![Kapture 2020-05-01 at 8 37 44](https://user-images.githubusercontent.com/131928/80805899-3688c400-8b87-11ea-88ca-3a7ae7de3589.gif) --------------------------------------------- Please do not remove the text below this line --------------------------------------------- DevTools version: 4.6.0-6cceaeb67 Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:344360 at Array.map (<anonymous>) at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:344166 at ci (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59620) at Ll (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:109960) at qc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102381) at Hc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102306) at Vc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102171) at Tc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:98781) at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:46014 Component stack: in Unknown in Unknown in div in div in n in div in bc in div in n in div in vc in div in div in div in So in Unknown in n in Unknown in div in div in rl in Ze in fn in Ga in _s
https://github.com/facebook/react/issues/18798
https://github.com/facebook/react/pull/18862
fb3f0acad9ac0b5756724d53eddaa444767dca07
69e732ac9d32ecb7251834af4209d46fff5d5102
2020-05-01T12:41:08Z
javascript
2020-05-08T00:07:20Z
closed
facebook/react
https://github.com/facebook/react
18,786
["packages/react-devtools-shared/src/__tests__/__snapshots__/profilingCache-test.js.snap", "packages/react-devtools-shared/src/devtools/views/Profiler/utils.js"]
Error: "Cannot read property 'duration' of undefined"
Describe what you were doing when the bug occurred: Profiled the new FB. Scrolled down to tail loads. --------------------------------------------- Please do not remove the text below this line --------------------------------------------- DevTools version: 4.6.0-a2fb84beb Call stack: at chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:345591 at Array.map (<anonymous>) at chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:345397 at Ai (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:32:62580) at zl (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:32:112694) at jc (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:32:104789) at Oc (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:32:104717) at Tc (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:32:104585) at gc (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:32:101042) at chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:32:47376 Component stack: at chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:344679 at div at div at n (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:194307) at div at Cc (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:346311) at div at n (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:3:8163) at div at bc at div at div at div at Do (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:262081) at chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:364048 at n (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:274563) at chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:277138 at div at div at ol (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:323458) at Ze (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:205764) at pn (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:215038) at $a (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:292153) at ws (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:369231)
https://github.com/facebook/react/issues/18786
https://github.com/facebook/react/pull/18862
fb3f0acad9ac0b5756724d53eddaa444767dca07
69e732ac9d32ecb7251834af4209d46fff5d5102
2020-04-30T00:58:44Z
javascript
2020-05-08T00:07:20Z
closed
facebook/react
https://github.com/facebook/react
18,702
["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.css", "packages/react-devtools-shared/src/devtools/views/Components/SelectedElement.js", "packages/react-devtools-shared/src/devtools/views/Components/types.js"]
Improve UX of finding full `key` value
## The current behavior The full value of the `key` is very difficult / impossible to find and use in the interface of the React Devtools. ![Kapture 2020-04-22 at 11 47 47](https://user-images.githubusercontent.com/1935696/79997715-25222680-84ba-11ea-97ba-51f1679a8c91.gif) Only managed to find it by accident :( ## The expected behavior The `key` is visible in the props list to the right. ### Detailed Proposal As mentioned below in https://github.com/facebook/react/issues/18702#issuecomment-617924196 Add a light divider and new section in the props panel to the right. Potentially also add a question mark that shows an explanation about the fact that things in this section are not really props. Ref (Original implementation): https://github.com/facebook/react-devtools/pull/328
https://github.com/facebook/react/issues/18702
https://github.com/facebook/react/pull/18737
ddcc69c83b59ef0f895aa5020196e2ae9de36133
2b9d7cf65fb5423a972b5dc920a3341b865085bf
2020-04-22T15:00:02Z
javascript
2020-05-11T20:17:13Z
closed
facebook/react
https://github.com/facebook/react
18,657
["packages/react-reconciler/src/ReactFiberBeginWork.new.js", "packages/react-reconciler/src/ReactFiberBeginWork.old.js", "packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.js"]
Bug: Normal update between Idle render and a Ping causes Fallback to get stuck
Repro case with a master build: https://codesandbox.io/s/stoic-mcnulty-dhygf?file=/src/App.js:668-703 Expected: we see content after a second. Actual: fallback never resolves. This happens in a sequence of: 1. Normal update - which suspends 2. Idle update - which also suspends 3. An unrelated normal update immediately followed by a ping (so they're batched) - here, we decide to stay on fallback, but should've shown the content If you remove `_setVersion(v => v + 1);` on line 44 then the issue goes away.
https://github.com/facebook/react/issues/18657
https://github.com/facebook/react/pull/18663
e7163a9c2fd64e67f8caadd58033b109ce06d748
cfefc81ab2f5103bedc9e45701e8c00c0689f499
2020-04-17T17:46:44Z
javascript
2020-04-17T23:32:55Z
closed
facebook/react
https://github.com/facebook/react
18,618
["fixtures/attribute-behavior/src/attributes.js", "packages/react-dom/src/shared/DOMProperty.js", "packages/react-dom/src/shared/possibleStandardNames.js"]
Bug: disableRemotePlayback not recognized
Passing `disableRemotePlayback` as an attribute like so: ``` <video disableRemotePlayback={true}> ``` Produces the warning: > Warning: React does not recognize the `disableRemotePlayback` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `disableremoteplayback` instead. If you accidentally passed it from a parent component, remove it from the DOM element. It seems like React should recognize it's similar to https://github.com/facebook/react/pull/15334. React version: 16.13.1 ## The current behavior Warning and not rendering the attribute ## The expected behavior Adding the attribute similar to how it'd render `disablePictureInPicture` with a final output of: ``` <video disableRemotePlayback ...> ``` When rendering it with: ``` <video disableRemotePlayback={true} ...> ```
https://github.com/facebook/react/issues/18618
https://github.com/facebook/react/pull/18619
71964c03465730d38e4378e1e29fb26758201bad
5f6b75dd265cd831d2c4e407c4580b9cd7d996f5
2020-04-15T20:22:42Z
javascript
2020-04-16T09:23:48Z
closed
facebook/react
https://github.com/facebook/react
18,589
["packages/shared/enqueueTask.js"]
Bug: react test utils do not work together with esm module
React version: 16.13.1 ## Steps To Reproduce This code works fine when using plain Node.js, but fails: when [esm module](https://github.com/standard-things/esm) is enabled: ```js const { act } = require('react-dom/test-utils'); act(async () => { console.log('something'); }).then( () => console.log('success'), () => console.log('error') ); ``` ``` $ node test.js something success ``` ``` $ node -r esm test.js something Warning: This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning. error ``` The warning is caused by an exception happened in this `try/catch` block: https://github.com/facebook/react/blob/72d00ab623502983ebd7ac0756cf2787df109811/packages/shared/enqueueTask.js#L15-L23 This is happening because `esm` module brings its own implementation of the `module` object with slightly different behavior which requires `this` context to be properly preserved. This one-line change should do the fix: ```diff -enqueueTaskImpl = nodeRequire('timers').setImmediate; +enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate; ``` This issue has also been reported to React-testing-library, which has similar code: https://github.com/testing-library/react-testing-library/issues/614 **Why should this be a fix in React and not in ESM?** React relied on undocumented behavior of Node modules loader. It was never guaranteed that it will work without proper `this` context. In fact, it will not work as expected if you try it with any non built-in module ```js const nodeRequire = module.require; nodeRequire('timers'); // built-in module, works require('react') // proper require, also works nodeRequire('react'); // Error: Cannot find module 'react', even though the module is installed ``` The current code in React may break in future if `timers` module will be replaced with anything else, or if Node.js changes their internal implementation.
https://github.com/facebook/react/issues/18589
https://github.com/facebook/react/pull/18632
5f6b75dd265cd831d2c4e407c4580b9cd7d996f5
7b4403cecde88b5cfd35606772babaf27bb2b69e
2020-04-13T13:31:39Z
javascript
2020-04-16T11:36:09Z
closed
facebook/react
https://github.com/facebook/react
18,571
["packages/react-devtools-shared/src/__tests__/__snapshots__/ownersListContext-test.js.snap", "packages/react-devtools-shared/src/__tests__/ownersListContext-test.js", "packages/react-reconciler/src/ReactFiber.new.js", "packages/react-reconciler/src/ReactFiber.old.js", "packages/react-reconciler/src/ReactFiberBeginWork.new.js", "packages/react-reconciler/src/ReactFiberBeginWork.old.js"]
DevTools: Memo(ForwardRef()) and "Rendered By" List
If you have `memo(forwardRef(X))`, then the inner component won't have a "rendered by" list. This is because it technically doesn't have an owner. It is artificial. I think we should ideally set up `_debugOwner` for these Fibers in DEV just so existing tooling can find them. Or special case them in DevTools.
https://github.com/facebook/react/issues/18571
https://github.com/facebook/react/pull/19556
94c0244bab7515c9b2c00b8e5312a9b6f31ef13a
0c52e24cb65a8f1c370184f58ee2d5601a3acd7f
2020-04-10T17:05:56Z
javascript
2020-08-10T14:49:10Z
closed
facebook/react
https://github.com/facebook/react
18,518
["packages/react-devtools-shared/src/devtools/views/Components/Element.css"]
Bug: DevTools search filtering removes a space
Compare two screenshots closely. The space after "from" disappears when the next word is selected. <img width="574" alt="Screenshot 2020-04-07 at 13 26 40" src="https://user-images.githubusercontent.com/810438/78668988-7b487480-78d3-11ea-8836-7c75fb907e4f.png"> <img width="776" alt="Screenshot 2020-04-07 at 13 26 35" src="https://user-images.githubusercontent.com/810438/78668983-7a174780-78d3-11ea-967e-31d3f68aef64.png">
https://github.com/facebook/react/issues/18518
https://github.com/facebook/react/pull/18527
dc49ea108c3a33fcc717ef346847dd1ad4d14f66
e8ac48f90b057cfb50d17138ca4b98c51d25bb42
2020-04-07T12:27:24Z
javascript
2020-04-07T17:28:21Z
closed
facebook/react
https://github.com/facebook/react
18,514
["packages/react-devtools-shared/src/backend/renderer.js"]
Bug: Dev Tools: TypeError: Cannot read property 'memoizedState' of null
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> React version: ## Steps To Reproduce Repro steps using confidential internal fb tool provided separately (https://fb.workplace.com/groups/2299331103613797/permalink/2605716262975278/) Gist of the repro: 1) open app 2) open react dev tools to profiling tab 3) turn on "Record why each component rendered while profiling" 4) interact with app 5) following error occurs: "TypeError: Cannot read property 'memoizedState' of null" 6) inspecting the flamegraph now shows incomplete information Based on the stack trace, it looks like the issue occurs specifically on this line: https://github.com/facebook/react/blob/3e94bce765d355d74f6a60feb4addb6d196e3482/packages/react-devtools-shared/src/backend/console.js#L135
https://github.com/facebook/react/issues/18514
https://github.com/facebook/react/pull/18522
e8ac48f90b057cfb50d17138ca4b98c51d25bb42
8edcd03b6450ef1d6b78fdb14b8f75682ae0589e
2020-04-07T00:58:24Z
javascript
2020-04-07T17:30:25Z
closed
facebook/react
https://github.com/facebook/react
18,512
["packages/react-devtools-extensions/package.json"]
Bug: dev tools development script is running production build
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> **React Dev Tools version**: 4.6.0 I'm not sure there is a problem with `package.json` within`react-devtools-extensions` package, or it's just my misunderstand how it works, but script `build:dev` create production build. Command above runs a each script (per browser) in which `NODE_ENV` is set to `production`. ## Steps To Reproduce 1. Just run `yarn build:dev` in `react-devtools-extensions` 2. It creates minified version of files. https://github.com/facebook/react/blob/master/packages/react-devtools-extensions/package.json ```javascript "scripts": { "build": "cross-env NODE_ENV=production yarn run build:chrome && yarn run build:firefox && yarn run build:edge", "build:dev": "cross-env NODE_ENV=development yarn run build:chrome && yarn run build:firefox && yarn run build:edge", "build:chrome": "cross-env NODE_ENV=production node ./chrome/build", "build:chrome:crx": "cross-env NODE_ENV=production node ./chrome/build --crx", "build:chrome:dev": "cross-env NODE_ENV=development node ./chrome/build", "build:firefox": "cross-env NODE_ENV=production node ./firefox/build", "build:firefox:dev": "cross-env NODE_ENV=development node ./firefox/build", "build:edge": "cross-env NODE_ENV=production node ./edge/build", "build:edge:crx": "cross-env NODE_ENV=production node ./edge/build --crx", "build:edge:dev": "cross-env NODE_ENV=development node ./edge/build", "test:chrome": "node ./chrome/test", "test:firefox": "node ./firefox/test", "test:edge": "node ./edge/test" }, ``` ## The current behavior `"build:dev": "cross-env NODE_ENV=development yarn run build:chrome && yarn run build:firefox && yarn run build:edge"` where `build:<browser>` has `NODE_ENV` set to `production`. ## The expected behavior Each step in `build:dev` should be replaced from `build:<browser>` to `build:<browser>:dev`
https://github.com/facebook/react/issues/18512
https://github.com/facebook/react/pull/18648
f8b084276dc2595b19d021c73664d9aab3fc9f7e
c5c25d35a3d98daedd0b3907dd1d32d512a6798a
2020-04-06T21:01:16Z
javascript
2020-04-17T00:39:16Z
closed
facebook/react
https://github.com/facebook/react
18,494
["packages/eslint-plugin-react-hooks/CHANGELOG.md"]
Bug: [email protected] no change logs / release page
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> React version: [email protected] ## Steps To Reproduce 1. Go to Releases on GitHub 2. Nothing there about [email protected] 3. Try to look for a CHANGELOG for [email protected] 4. No CHANGELOG <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Issues without reproduction steps or code examples may be immediately closed as not actionable. --> Link to code example: Not code related. <!-- Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve. --> ## The current behavior No change logs. ## The expected behavior Change logs on the Releases page for [email protected] or a separate CHANGELOG. Especially for major version changes so developers are aware of breaking changes that need to be fixed/prioritised. Thank you.
https://github.com/facebook/react/issues/18494
https://github.com/facebook/react/pull/18801
5ac9ca72dfb73a06157bb177cd695f6b77fc900e
4e93b9364c978fd0c1224f8008dd19f88a82a048
2020-04-04T23:10:54Z
javascript
2020-05-01T16:12:32Z
closed
facebook/react
https://github.com/facebook/react
18,486
["packages/react-reconciler/src/ReactFiberHooks.js", "packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.internal.js", "packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.internal.js"]
Bug: Dropped update when render phase update happens before suspending
Sandbox: https://codesandbox.io/s/cranky-kapitsa-op3jh Repro: type "a" and then after a second "b" Expected: Eventually you'll see "ab" in all fields. Pending "..." indicator goes away. Actual: You'll keep seeing "a" in low pri field. Pending "..." indicator is stuck.
https://github.com/facebook/react/issues/18486
https://github.com/facebook/react/pull/18537
2def7b3caf4b15ade69eb16b5ec87afa0dcd7992
2dddd1e00cdadad1783aa55ac65a28634590e9c1
2020-04-04T00:49:12Z
javascript
2020-04-08T02:17:01Z
closed
facebook/react
https://github.com/facebook/react
18,472
["packages/react-devtools-shared/src/devtools/views/Components/SelectedElement.css", "packages/react-devtools-shared/src/devtools/views/Components/SelectedElement.js", "packages/react-devtools-shared/src/devtools/views/Components/Tree.js", "packages/react-devtools-shared/src/devtools/views/hooks.js"]
DevTools: Hovering "Rendered by" list should highlight elements
This list is pretty awesome: <img width="390" alt="Screenshot 2020-04-03 at 00 12 08" src="https://user-images.githubusercontent.com/810438/78308234-e0047780-753f-11ea-9d4f-1e2d31e5baa0.png"> But always struggle to guess which component in the owner list I need to jump to. We should make hovering the owner list highlight components, just like the main tree view does. @hristo-kanchev, interested?
https://github.com/facebook/react/issues/18472
https://github.com/facebook/react/pull/18479
f312a3fc36ef8b45e68a279f4c8113e14f0b0dd6
7785a5263e0bbbdcb997a84a840c9c039fcf6e5d
2020-04-02T23:13:49Z
javascript
2020-04-03T17:49:49Z
closed
facebook/react
https://github.com/facebook/react
18,357
["packages/react-debug-tools/src/__tests__/ReactDevToolsHooksIntegration-test.js", "packages/react-reconciler/src/ReactFiberBeginWork.js", "packages/react-reconciler/src/ReactFiberHydrationContext.js", "packages/react-reconciler/src/ReactFiberSuspenseComponent.js", "packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.internal.js"]
Bug: High-pri setState causes primary tree to get unhidden
Repro: https://codesandbox.io/s/fast-water-4i4jb Notice the flash. I'd expect `suspended` to be `true` during the high pri render.
https://github.com/facebook/react/issues/18357
https://github.com/facebook/react/pull/18411
1f8c40451ae15107abcdecb1ee67b2ed8f9d008e
d7382b6c43b63ce15ce091cf13db8cd1f3c4b7ae
2020-03-20T18:08:47Z
javascript
2020-03-30T18:25:04Z
closed
facebook/react
https://github.com/facebook/react
18,353
["packages/react-reconciler/src/ReactFiberBeginWork.js", "packages/react-reconciler/src/ReactFiberRoot.js", "packages/react-reconciler/src/__tests__/ReactSuspenseList-test.internal.js", "packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.internal.js"]
Bug: Updates in the primary tree only unsuspend once
https://codesandbox.io/s/upbeat-frost-3tt25 1. Press Suspend, see "Loading..." 2. Wait five seconds, you'll see "Happy birthday" at some point 3. You won't see it again no matter how long you wait Expected: you'll see it every five seconds.
https://github.com/facebook/react/issues/18353
https://github.com/facebook/react/pull/18384
5bd1bc29b3e930614e41c32c03c00925cd3e8d6c
9d67847f7b41e408016cfa16450323b3fee8bc56
2020-03-20T01:41:21Z
javascript
2020-03-26T18:31:40Z
closed
facebook/react
https://github.com/facebook/react
18,284
["packages/react-devtools-shared/src/devtools/views/Components/Components.css", "packages/react-devtools-shared/src/devtools/views/DevTools.css", "packages/react-devtools-shared/src/devtools/views/Profiler/Profiler.css"]
Bug: DevTools Profiler doesn't show selected commit
I don't see the selection at all. My version is 4.5.0. I think this regressed. <img width="266" alt="Screenshot 2020-03-11 at 23 40 37" src="https://user-images.githubusercontent.com/810438/76475966-6d005900-63f8-11ea-8779-7330eba193ee.png">
https://github.com/facebook/react/issues/18284
https://github.com/facebook/react/pull/18286
5374919033fd6bc52ed7522b2ba34cdc80b4f570
97a8c72bf8fee0a1382497776663b58fb7129a80
2020-03-12T00:28:58Z
javascript
2020-03-12T02:12:57Z
closed
facebook/react
https://github.com/facebook/react
18,256
["packages/react-devtools-shared/src/__tests__/__snapshots__/storeComponentFilters-test.js.snap", "packages/react-devtools-shared/src/__tests__/storeComponentFilters-test.js", "packages/react-devtools-shared/src/backend/renderer.js"]
Error: "Cannot read property 'concat' of undefined"
Describe what you were doing when the bug occurred: 1. I was using the devtools to investigate some performance issues w/ an app I help maintain 2. I had just turned on the "Record why each component rendered while profiling" checkbox 3. I ran a profile while navigating on the underlying page The react profiler tab in the devtools gave this error, I think as I clicked the record icon to stop recording the profile. --------------------------------------------- Please do not remove the text below this line --------------------------------------------- DevTools version: 4.5.0-355970aa4 Call stack: at N (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:160881) at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:160015) at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939) at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939) at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939) at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939) at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939) at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939) at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939) at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939) Component stack: in ec in div in div in div in So in Unknown in n in Unknown in div in div in rl in Ze in fn in Ga in _s
https://github.com/facebook/react/issues/18256
https://github.com/facebook/react/pull/19987
7559722a865e89992f75ff38c1015a865660c3cd
e614e6965749c096c9db0e6ad2844a2803ebdcb6
2020-03-09T17:40:03Z
javascript
2020-10-13T17:38:58Z
closed
facebook/react
https://github.com/facebook/react
18,235
["packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js", "packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js"]
Bug: [eslint-plugin-react-hooks] - exhaustive-deps autofix not working after 2.4.0
Hi there, after upgrading to the latest version the autofix does not automatically includes the missing deps, is this the expected behavior? I didn't find any release notes of the lib so I couldn't check if that was expected, also, I'd say, if done on purpose, this change should be on a major version, shouldn't it? ## The current behavior 2.4.0 or above Some deps are missing. ![image](https://user-images.githubusercontent.com/4994258/76088672-2ee9dc00-5f97-11ea-988a-8b6bb36c74d0.png) Quick fix shows: ![image](https://user-images.githubusercontent.com/4994258/76088711-42954280-5f97-11ea-990c-5a113b27013b.png) `eslint --fix` shows: ![image](https://user-images.githubusercontent.com/4994258/76088908-99028100-5f97-11ea-81e7-1a9fe4175881.png) But code is not being updated, although if I manually click it add the missing deps. ## Expected behavior, 2.3.0 Noticed it shows another context menu: ![image](https://user-images.githubusercontent.com/4994258/76089526-918fa780-5f98-11ea-9b88-6d88a0550c8c.png) Also it does add the missing deps using the same `eslint --fix` command.
https://github.com/facebook/react/issues/18235
https://github.com/facebook/react/pull/18437
90e90ac8e0d16113b9566ef5feea3da11e5f4458
1960131f11196325ff47458355d25071049aaa7a
2020-03-06T13:59:13Z
javascript
2020-03-31T10:43:01Z
closed
facebook/react
https://github.com/facebook/react
18,231
["package.json"]
Warning: Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts. ## Steps To Reproduce 1. `yarn build-for-devtools` ## The current behavior ![image](https://user-images.githubusercontent.com/36763164/76021289-b69b0080-5f2d-11ea-81d6-711faf39e6da.png) ## The expected behavior ![image](https://user-images.githubusercontent.com/36763164/76021328-c7e40d00-5f2d-11ea-9ba3-df51c0b86cef.png)
https://github.com/facebook/react/issues/18231
https://github.com/facebook/react/pull/18232
29534252add3b90f7984a0f1c89937ed32d36ceb
9e5626cdde7d1d698458729197707c992726c6e5
2020-03-05T20:09:13Z
javascript
2020-03-10T15:37:02Z
closed
facebook/react
https://github.com/facebook/react
18,226
["packages/react-devtools-shared/src/devtools/views/DevTools.js"]
DevTools: Add shortcut keys for standalone version
Suggested keys: * ⌘1 - Switch to "Components" tab * ⌘2 - Switch to "Profiler" tab Note that these shortcut keys should **only** be implemented for the [standalone DevTools](https://www.npmjs.com/package/react-devtools) since (1) the browser already uses these shortcut keys and (2) the "Component" and "Profiler" tabs are only part of DevTools in the standalone version anyway.
https://github.com/facebook/react/issues/18226
https://github.com/facebook/react/pull/18248
5152c4a9fd97e70fe77a8ade69af66445e39efe1
6b7281ec14397d6908fb4ae3292243ab6b2c4ef8
2020-03-05T17:48:11Z
javascript
2020-03-18T18:05:41Z
closed
facebook/react
https://github.com/facebook/react
18,178
["packages/react-dom/src/__tests__/ReactCompositeComponent-test.js", "packages/react-reconciler/src/ReactFiberBeginWork.js", "packages/react-reconciler/src/ReactFiberWorkLoop.js", "packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js", "packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.internal.js"]
Bug: too hard to fix "Cannot update a component from inside the function body of a different component."
# Note: React 16.13.1 fixed some cases where this was overfiring. If upgrading React and ReactDOM to 16.13.1 doesn't fix the warning, read this: https://github.com/facebook/react/issues/18178#issuecomment-595846312 ---- React version: 16.13.0 ## Steps To Reproduce 1. Build a time machine. 2. Go to the year 2017. 3. Build a huge application of 10K lines of code. 4. Get 80 (!) dependencies at package.json file including ones that become no longer maintained. 5. Update React to the latest version at February 27, 2020. 6. Get tons of errors that you don't know how to fix. 7. Tell your client that fixes are going to take unknown time and it's going to cost $$$ + days or weeks of investigation or we're going to get stuck with the outdated version of React and related libraries forever which will cost more $$$ but later. Being serious, the business I work for isn't interested on that at all. Obviously I'd never made it happen to get such warnings to appear if I'd get them earlier. Currently that's impossibly hard to make the errors to be fixed because I get them at many different cases and with a huge stack trace. I tried to fix at least one of the appearing errors and it already took a lot of time. I tried to debug some of used libraries but got no luck. Just one example: ![image](https://user-images.githubusercontent.com/1082083/75559100-8fcf5c80-5a4b-11ea-8173-4f0a62cc5de3.png) There we can notice the use of an outdated react-router, an outdated redux-connect (which I had to put to the project source to fix errors of outdated `componentWillReceiveProps` method), some HOCs created by recompose etc. It isn't just a simple virtual DOM tree where I can walk thru components developed by me and search by `setState` string to fix the bug, that's way more complicated than that. Please make an "UNSAFE" option to disable this error or provide a simpler way to find where the error is thrown 🙏
https://github.com/facebook/react/issues/18178
https://github.com/facebook/react/pull/18330
22cab1cbd6ad52925828643c8c6d0d4fd7890c54
fe1f79b95b5987b7179d1eaf5ff5bb9a7bc4b7b5
2020-02-28T15:15:25Z
javascript
2020-03-18T00:07:14Z
closed
facebook/react
https://github.com/facebook/react
18,099
["packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js", "packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js"]
Bug: [email protected]: Doesn't allow to use quick fix for exhaustive deps in Inteliji IDEs
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> React version: 16 eslint-plugin-react-hooks: 2.4.0 ## Steps To Reproduce 1. Install `yarn add -D eslint-plugin-react-hooks` 2. Run IDE (I tried WebStorm and RubyMine) 3. Do an exhaustive deps error: ``` function Component(props) { useEffect(() => { console.log(props.a); }, []); } ``` 4. Observe Webstorm quick fix hint allows only to suppress error pressing control+shift+enter with `// eslint-disable-next-line react-hooks/exhaustive-deps` ![image](https://user-images.githubusercontent.com/23057131/75073519-3ffc0d00-5502-11ea-8c9f-b0d5721ce26d.png) 5. Remove `yarn remove eslint-plugin-react-hooks` 6. Add `yarn add -D [email protected]` 7. Restart WebStorm 8. Objserve quick fix hint is shown and error can be fixed with control+shift+enter ![image](https://user-images.githubusercontent.com/23057131/75073740-c0bb0900-5502-11ea-9bc9-e573edcf2809.png) <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Issues without reproduction steps or code examples may be immediately closed as not actionable. --> Link to code example: unavailable <!-- Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve. --> I know it's a weird issue and I have no knowledge where WebStorm or RubyMine take hints for quick fixes, but it's an extremely neat thing once you get used to it. And it looks like some changes introduced in 2.4.0 broke the contract.
https://github.com/facebook/react/issues/18099
https://github.com/facebook/react/pull/18437
90e90ac8e0d16113b9566ef5feea3da11e5f4458
1960131f11196325ff47458355d25071049aaa7a
2020-02-21T21:39:42Z
javascript
2020-03-31T10:43:01Z
closed
facebook/react
https://github.com/facebook/react
18,044
["packages/react-devtools-shared/src/__tests__/__snapshots__/profilingCache-test.js.snap", "packages/react-devtools-shared/src/devtools/views/Profiler/utils.js"]
Error: "Cannot read property 'duration' of undefined"
**Description** This error happens in devtools (when running `devtools shell`), I didn't investigate it in detail, but seemingly the reason is that inside `InteractionListItem.js` we are trying to access `commitData[commitIndex].duration` however in some cases `commitData` is an array one index smaller than `commitIndex`. **How to recreate:** 1. try `update` using interaction tracing, 2. Play around a little bit with other items (the `List` maybe), click items, add items, click items again 2. try 'update' using interaction tracing again 3. Then it sometimes happens I can try to investigate it in detail, however, a small fix is to first check if the index actually exists. --------------------------------------------- Please do not remove the text below this line --------------------------------------------- DevTools version: 4.4.0-9def56ec0 Call stack: at http://localhost:8080/dist/devtools.js:24337:2421 at Array.map (<anonymous>) at InteractionListItem (http://localhost:8080/dist/devtools.js:24337:2029) at renderWithHooks (http://localhost:8080/dist/devtools.js:3629:157) at mountIndeterminateComponent (http://localhost:8080/dist/devtools.js:3911:889) at beginWork$1 (http://localhost:8080/dist/devtools.js:4214:101) at HTMLUnknownElement.callCallback (http://localhost:8080/dist/devtools.js:946:102) at Object.invokeGuardedCallbackDev (http://localhost:8080/dist/devtools.js:966:45) at invokeGuardedCallback (http://localhost:8080/dist/devtools.js:981:126) at beginWork$$1 (http://localhost:8080/dist/devtools.js:5167:1) Component stack: in InteractionListItem in InteractionListItem (created by List) in div (created by List) in div (created by List) in List (at Interactions.js:135) in div (at Interactions.js:134) in Interactions (at Interactions.js:40) in div (created by AutoSizer) in AutoSizer (at Interactions.js:39) in div (at Interactions.js:38) in InteractionsAutoSizer (at Profiler.js:55) in div (at Profiler.js:124) in div (at Profiler.js:100) in div (at Profiler.js:99) in SettingsModalContextController (at Profiler.js:98) in Profiler (at portaledContent.js:22) in ErrorBoundary (at portaledContent.js:21) in PortaledContent (at DevTools.js:178) in div (at DevTools.js:175) in div (at DevTools.js:151) in ProfilerContextController (at DevTools.js:150) in TreeContextController (at DevTools.js:149) in SettingsContextController (at DevTools.js:144) in ModalDialogContextController (at DevTools.js:143) in DevTools (at frontend.js:70) in DevTools
https://github.com/facebook/react/issues/18044
https://github.com/facebook/react/pull/18862
fb3f0acad9ac0b5756724d53eddaa444767dca07
69e732ac9d32ecb7251834af4209d46fff5d5102
2020-02-15T23:29:49Z
javascript
2020-05-08T00:07:20Z
closed
facebook/react
https://github.com/facebook/react
18,020
["packages/react-reconciler/src/ReactFiberWorkLoop.js", "packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.internal.js"]
Bug: event.preventDefault is wrecking havoc with startTransition
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> React version: 241c446 ## Steps To Reproduce https://codesandbox.io/s/romantic-gates-2hrjp 1. Click "Show A" to render the lazy component. 2. Type into the input whose placeholder says it works. startTransition will call, inline loading will show for 2 seconds, then the Suspense boundary will trigger. 3. Click the "update" button - same as above - everything works 4. Now type into the input whose placeholder says it *doesn't* work. Note that the inline placeholder stays up for the entire time; the Suspense boundary never shows. 5. Now note that steps 2 or 3 will likely immediately show the suspense boundary. The bypassed rendering of the Suspense boundary from step 4 seems to be backed up, stuck somewhere, and is now unleashed. Note that steps 2 and 3 are optional. No matter what, the preventDefault that's called in step 4 causes this incorrect behavior no matter whether steps 2 or 3 have been exercised. <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Issues without reproduction steps or code examples may be immediately closed as not actionable. --> Link to code example: see above <!-- Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve. --> ## The current behavior startTransition should suspend after the timeout even if event.preventDefault is called. ## The expected behavior it does not
https://github.com/facebook/react/issues/18020
https://github.com/facebook/react/pull/18515
d53a4dbbc2514f5986630844f315a8faac7e024d
ddc4b65cfe17b3f08ff9f18f8804ff5b663788c8
2020-02-11T21:41:06Z
javascript
2020-04-07T20:34:41Z
closed
facebook/react
https://github.com/facebook/react
18,010
["packages/react-devtools-shared/src/devtools/views/Profiler/ProfilerContext.js"]
DevTools Profiler: "Could not find commit data for root …"
The DevTools Profiler occasionally encounters the error: > Could not find commit data for root "..." and commit ... This issue is intermittent and we do not currently know hot to reproduce it. **If you can reproduce it** we would love to get any of the following information from you: * Info about how you reproduce it. (Share your code or site with us?) * An exported Profiler JSON that contains the bug. (This may be less useful, since the bug likely happens pre-export- but may still be helpful.)
https://github.com/facebook/react/issues/18010
https://github.com/facebook/react/pull/18880
61f2a560e0c5a0a7d218c52a1b74b3f3592acb9b
a3fccd2567bfa154a4b2154ef14203999804e39b
2020-02-10T19:24:14Z
javascript
2020-05-12T22:47:23Z
closed
facebook/react
https://github.com/facebook/react
17,955
["packages/react-devtools-shared/src/__tests__/__snapshots__/inspectedElementContext-test.js.snap", "packages/react-devtools-shared/src/__tests__/inspectedElementContext-test.js", "packages/react-devtools-shared/src/devtools/views/Components/HooksTree.css", "packages/react-devtools-shared/src/devtools/views/Components/HooksTree.js"]
Bug(devtools): complex types ignored sometimes in useDebugValue
React version: 0.0.0-241c4467e (current `next`) and 16.12.0 Devtools: 4.4.0 (1/3/2020). [...] Created from revision f749045a5 on 1/3/2020. ## Steps To Reproduce 1. Visit https://codesandbox.io/s/usedebugvalue-complex-types-3x877 2. Inspect `App` Component 3. `NoHooksAtAll` displays no hooks at all 4. `IgnoredComplexValue` displayes the custom hook but without a value 5. `NoHooksAtAll` displays the custom hook with its value Link to code example: ## The current behavior Complex values (and custom hooks) are sometimes not displayed ## The expected behavior Implementation of components and hooks should not affect if these are displayed.
https://github.com/facebook/react/issues/17955
https://github.com/facebook/react/pull/18070
90f8fe6f5509cab7d6d280b4ed17181697f394e9
756e1ea5d4f258f917b2c50a66bb5b07900d37a1
2020-02-01T23:21:31Z
javascript
2020-03-17T20:57:01Z
closed
facebook/react
https://github.com/facebook/react
17,945
["packages/react-reconciler/src/ReactFiberCommitWork.js", "packages/react-reconciler/src/ReactFiberHooks.js", "packages/react-reconciler/src/ReactFiberWorkLoop.js", "packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.internal.js"]
Passive effect destroy and create functions are interleaved
We currently run all passive destroy functions for an individual Fiber before running passive create functions. What we *should* be doing is running all passive destroy functions for *all* fibers before running *any* passive create functions (like we do for layout effects). The reason this is important is that interleaving destroy/create effects between sibling components might cause components to interfere with each other (e.g. a destroy function in one component may unintentionally override a ref value set by a create function in another component). We handle this for layout effects by invoking *all* destroy functions during the "mutation" phase and *all* create functions during the "layout" phase, but for passive effects we call both in a single traversal: https://github.com/facebook/react/blob/38cd75861f44a40e686a39403bff39bf16fd796d/packages/react-reconciler/src/ReactFiberCommitWork.js#L394-L409 Fixing this probably means splitting our passive effects loop into two passes: https://github.com/facebook/react/blob/38cd75861f44a40e686a39403bff39bf16fd796d/packages/react-reconciler/src/ReactFiberWorkLoop.js#L2179-L2222 However this could be a breaking change (since it would affect timing) so we should probably do it behind a feature flag for now. Also note that splitting this into two passes could have another unintended effect: an error thrown in a passive destroy function would no longer prevent subsequent create functions from being run on that Fiber (as is currently the case) unless we added code to handle that specific case. We should decide what the expected behavior is here.
https://github.com/facebook/react/issues/17945
https://github.com/facebook/react/pull/17947
529e58ab0a62ed22be9b40bbe44a6ac1b2c89cfe
f7278034de5a289571f26666e6717c4df9f519ad
2020-01-31T18:49:40Z
javascript
2020-02-11T17:52:54Z
closed
facebook/react
https://github.com/facebook/react
17,935
["packages/react-devtools-shared/src/backend/views/TraceUpdates/index.js"]
Bug: Excessive cpu usage of the page when react-devtools is active
When option "Highlight updates when components render" is activated the whole page repaints in rapid succession after the components state has been changed. It causes 100% CPU usage by the browser and unpleasant DX due low fps. React version: 16.12.0 DevTools version 4.4.0-f749045a5 The sequance of actions is important: 1. Open react application 2. Open react-devtools 3. Check option "Highlight updates when components render" in react-devtools settings 4. Change the internal state of a component 5. In activity monitor there will be 100% cpu usage of the page, or check option "Paint flashing" in rendering pane of chrome devtools <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Issues without reproduction steps or code examples may be immediately closed as not actionable. --> ![image](https://user-images.githubusercontent.com/2382567/73440472-ec275980-4383-11ea-94c3-33ede22df01c.png) ![image](https://user-images.githubusercontent.com/2382567/73440513-f8abb200-4383-11ea-824f-3d38b3cec4f6.png) The code example (to trigger the issue: 1) check the option "Highlight updates when components render" and 2) click on the button: ``` import React, {useState} from 'react'; function App() { const [count, setCount] = useState(0); return ( <button onClick={() => setCount(count + 1)}> click #{count} </button> ); } export default App; ``` ## The current behavior Excessive cpu usage of the page ## The expected behavior Normal cpu usage of the page
https://github.com/facebook/react/issues/17935
https://github.com/facebook/react/pull/18498
fe2cb525542443aaf1447c4069354c12659fd186
c781156163f014d15eeb464296a17aba4406d2ec
2020-01-30T10:19:22Z
javascript
2020-04-06T15:17:45Z
closed
facebook/react
https://github.com/facebook/react
17,895
["packages/react-devtools-shared/src/backend/utils.js", "packages/react-devtools-shell/src/app/InspectableElements/UnserializableProps.js"]
Bug: fix BigInt in copyElementPath in react-devtools
This is a continuation of an previous issue to add support for the BigInt data type in React DevTools. Original PR https://github.com/facebook/react/pull/17233 (merged) This happens when you try to copy a BigInt value to clipboard via React DevTools. ![](https://image.prntscr.com/image/c4SnNIPXR1GlSXIt49FOlw.png) Would @nutboltu mind taking a look? ``` backend.js:1 Uncaught TypeError: Do not know how to serialize a BigInt at JSON.stringify (<anonymous>) at c (backend.js:1) at Object.copyElementPath (backend.js:6) at t.<anonymous> (backend.js:6) at t.r.emit (backend.js:6) at backend.js:32 at t (backend.js:8) c @ backend.js:1 copyElementPath @ backend.js:6 (anonymous) @ backend.js:6 r.emit @ backend.js:6 (anonymous) @ backend.js:32 t @ backend.js:8 postMessage (async) (anonymous) @ contentScript.js:1 <./app-insights/app-insights>:50 Uncaught TypeError: Cannot read property 'message' of null at trackError (<./app-insights/app-insights>:50) at eval (<./app-insights/app-insights>:22) trackError @ <./app-insights/app-insights>:50 eval @ <./app-insights/app-insights>:22 setTimeout (async) eval @ <./app-insights/app-insights>:21 error (async) initAppInsights @ <./app-insights/app-insights>:17 main @ VM70658 client>:101 main @ ./../../../node_modules/@tessin/tcm/lib/dev/boot-loader:31 async function (async) main @ ./../../../node_modules/@tessin/tcm/lib/dev/boot-loader:27 (anonymous) @ 219:3435 backend.js:1 Uncaught TypeError: Do not know how to serialize a BigInt at JSON.stringify (<anonymous>) at c (backend.js:1) at Object.copyElementPath (backend.js:6) at t.<anonymous> (backend.js:6) at t.r.emit (backend.js:6) at backend.js:32 at t (backend.js:8) c @ backend.js:1 copyElementPath @ backend.js:6 (anonymous) @ backend.js:6 r.emit @ backend.js:6 (anonymous) @ backend.js:32 t @ backend.js:8 postMessage (async) (anonymous) @ contentScript.js:1 <./app-insights/app-insights>:50 Uncaught TypeError: Cannot read property 'message' of null at trackError (<./app-insights/app-insights>:50) at eval (<./app-insights/app-insights>:22) trackError @ <./app-insights/app-insights>:50 eval @ <./app-insights/app-insights>:22 setTimeout (async) eval @ <./app-insights/app-insights>:21 error (async) initAppInsights @ <./app-insights/app-insights>:17 main @ VM70658 client>:101 main @ ./../../../node_modules/@tessin/tcm/lib/dev/boot-loader:31 async function (async) main @ ./../../../node_modules/@tessin/tcm/lib/dev/boot-loader:27 (anonymous) @ 219:3435 backend.js:1 Uncaught TypeError: Do not know how to serialize a BigInt at JSON.stringify (<anonymous>) at c (backend.js:1) at Object.copyElementPath (backend.js:6) at t.<anonymous> (backend.js:6) at t.r.emit (backend.js:6) at backend.js:32 at t (backend.js:8) c @ backend.js:1 copyElementPath @ backend.js:6 (anonymous) @ backend.js:6 r.emit @ backend.js:6 (anonymous) @ backend.js:32 t @ backend.js:8 postMessage (async) (anonymous) @ contentScript.js:1 <./app-insights/app-insights>:50 Uncaught TypeError: Cannot read property 'message' of null at trackError (<./app-insights/app-insights>:50) at eval (<./app-insights/app-insights>:22) ```
https://github.com/facebook/react/issues/17895
https://github.com/facebook/react/pull/17931
38cd75861f44a40e686a39403bff39bf16fd796d
d9a5170594486deeb767c243cc4b381e9e085c79
2020-01-23T11:59:29Z
javascript
2020-01-31T22:35:59Z
closed
facebook/react
https://github.com/facebook/react
17,885
[".eslintrc.js", "package.json", "packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js", "packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/UIManager.js", "packages/react-native-renderer/src/legacy-events/SyntheticEvent.js", "yarn.lock"]
Enable a lint rule not to define after return and fix existing callsites
https://twitter.com/therealyashsriv/status/1219691914523545601 We shouldn't generate code that might cause browser or linting to complain. https://github.com/facebook/react/blob/0cf22a56a18790ef34c71bef14f64695c0498619/packages/legacy-events/SyntheticEvent.js#L259 It's also just a confusing pattern at best.
https://github.com/facebook/react/issues/17885
https://github.com/facebook/react/pull/19733
b7d18c4daf244b991858cc9b0706b64589f4fd60
53e622ca7f643cc9d18c9c4896b68ab14549e292
2020-01-21T19:07:16Z
javascript
2020-09-01T12:55:10Z
closed
facebook/react
https://github.com/facebook/react
17,832
["packages/react-devtools-core/src/backend.js", "packages/react-devtools-extensions/src/backend.js", "packages/react-devtools-extensions/src/injectGlobalHook.js", "packages/react-devtools-extensions/src/main.js", "packages/react-devtools-inline/src/backend.js", "packages/react-devtools-shared/src/backend/index.js"]
[react-devtools-extensions] Bug: Uncaught TypeError: Cannot read property 'sub' of undefined when navigating to plain-text pages
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --> React Developer Tools: 4.4.0 f749045a5 (1/3/2020) from chrome webstore Chromium: 81.0.4024.0 snapshot Ubuntu: 18.04 ## Steps To Reproduce 1. Open chrome with React Developer Tools installed 2. Open developer console 3. In console settings (cogwheel in console's top right corner) check "Preserve log" checkbox (to make sure that the log is not overwritten on navigation) 4. Navigate to a React-enabled website, e.g. `https://reactjs.org` 5. Navigate to a plain-text page, such as `https://reactjs.org/robots.txt` ## The current behavior Error is printed in console: ``` backend.js:32 Uncaught TypeError: Cannot read property 'sub' of undefined at g (backend.js:32) at e (backend.js:8) g @ backend.js:32 e @ backend.js:8 postMessage (async) a @ contentScript.js:1 117 @ contentScript.js:1 n @ contentScript.js:1 (anonymous) @ contentScript.js:1 (anonymous) @ contentScript.js:1 ``` where `backend.js` is a link to `chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/backend.js` `fmkadmapgofadopljbjfkapdkoienihi` is an ID of React Developer Tools: I verified by opening `chrome://extensions/` and performing page search for this ID. ## The expected behavior No errors ## Notes It's a convoluted usecase, but I thought it may help to catch bugs for more important ones. I am not sure whether it's plain-text-ness of the page that is important, but that's how you can reproduce it. The hypothesis is that dev tools do not expect HTML tree to disappear on navigation, or either extension enters a state where it cannot digest the plain text pages (and it probably shouldn't try). <sup> P.S. Thanks for the refreshed extension, it makes dev experience so wonderful! ❤️ </sup>
https://github.com/facebook/react/issues/17832
https://github.com/facebook/react/pull/17848
9ad35905fae96036a130d9dec24b47132dfe4076
08c1f79e1e13719ae2b79240bbd8f97178ddd791
2020-01-14T09:43:10Z
javascript
2020-02-02T20:04:48Z
closed
facebook/react
https://github.com/facebook/react
17,822
["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/backend/views/Highlighter/Overlay.js"]
DevTools: Refactor Overlay to remove "reactInternal" hack
See #17798
https://github.com/facebook/react/issues/17822
https://github.com/facebook/react/pull/17841
643dcb5526f05957ffaf1c8ba991563f988d655b
8aefb1995cc6d46cc29778b0c54bd989478973c0
2020-01-11T15:59:04Z
javascript
2020-01-14T23:38:09Z
closed
facebook/react
https://github.com/facebook/react
17,781
["packages/react-devtools-shared/src/__tests__/__snapshots__/inspectedElementContext-test.js.snap", "packages/react-devtools-shared/src/__tests__/inspectedElementContext-test.js", "packages/react-devtools-shared/src/__tests__/legacy/__snapshots__/inspectElement-test.js.snap", "packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js", "packages/react-devtools-shared/src/hydration.js", "packages/react-devtools-shared/src/utils.js", "packages/react-devtools-shell/src/app/InspectableElements/SimpleValues.js"]
Dev Tools UI: Bad readability of props of type function
Dev Tools evolved a lot the last months. Last version doesn't display well functions in props, it leaves an empty field so hard to see if the prop is really passed and if there's really and function passes in the props of the component. For example i dont' know if the prop `onChange` really exists as a prop of the component `TokenInput`. Don't know also which props are undefined. Could be also great to use the propTypes to show the types of the props. ![image](https://user-images.githubusercontent.com/25119847/71781247-b5e8fb00-2fcc-11ea-9a08-86f7b772a138.png) ![image](https://user-images.githubusercontent.com/25119847/71781235-8c2fd400-2fcc-11ea-8c3f-fb0afe3ab8fc.png)
https://github.com/facebook/react/issues/17781
https://github.com/facebook/react/pull/17789
24f824250fde6418569222f6e33b35ba9c1f1f46
2bb227ef801c3a876d8064bc75903c29c94bc71d
2020-01-05T14:06:53Z
javascript
2020-01-06T17:19:59Z
closed
facebook/react
https://github.com/facebook/react
17,764
["packages/react-devtools-shared/src/__tests__/__snapshots__/inspectedElementContext-test.js.snap", "packages/react-devtools-shared/src/__tests__/inspectedElementContext-test.js", "packages/react-devtools-shared/src/__tests__/legacy/__snapshots__/inspectElement-test.js.snap", "packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js", "packages/react-devtools-shared/src/devtools/views/Components/KeyValue.js", "packages/react-devtools-shared/src/devtools/views/utils.js", "packages/react-devtools-shared/src/utils.js", "packages/react-devtools-shell/src/app/InspectableElements/EdgeCaseObjects.js", "packages/react-devtools-shell/src/app/InspectableElements/InspectableElements.js", "packages/react-devtools-shell/src/app/InspectableElements/UnserializableProps.js"]
React Developer Tools react-router-dom e.hasOwnProperty is not a function, Cannot read property 'name' of undefined
bug Uncaught TypeError: Cannot read property 'name' of undefined Uncaught TypeError: e.hasOwnProperty is not a function infinite loading in component view ![image](https://user-images.githubusercontent.com/8398353/71717720-a37e8e00-2e21-11ea-82a3-cc6d815158fc.png) Reproduce: use hook useRouter or HOC withRouter from react-router-dom and select component with hook/hoc in components view react developer tools Issue is caused by not-bug https://github.com/hapijs/hapi/issues/3280 (query object does not have constructor and does not have hasOwnProperty) ![image](https://user-images.githubusercontent.com/8398353/71717283-4afac100-2e20-11ea-9f86-84f63cb73ab1.png) ![image](https://user-images.githubusercontent.com/8398353/71717412-b6dd2980-2e20-11ea-8514-04708cf02015.png) ![image](https://user-images.githubusercontent.com/8398353/71717397-a75de080-2e20-11ea-9dc3-35da5a4f0ff4.png)
https://github.com/facebook/react/issues/17764
https://github.com/facebook/react/pull/17768
5d3d71b1ddbbf5743108c998904f7bb575f4330e
7e2ab87a613b11250fe9678cc111fc8485c8a683
2020-01-03T10:09:22Z
javascript
2020-01-03T17:34:12Z
closed
facebook/react
https://github.com/facebook/react
17,761
["packages/react-devtools-shared/src/__tests__/__snapshots__/inspectedElementContext-test.js.snap", "packages/react-devtools-shared/src/__tests__/inspectedElementContext-test.js", "packages/react-devtools-shared/src/__tests__/legacy/__snapshots__/inspectElement-test.js.snap", "packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js", "packages/react-devtools-shared/src/devtools/views/Components/KeyValue.js", "packages/react-devtools-shared/src/devtools/views/utils.js", "packages/react-devtools-shared/src/utils.js", "packages/react-devtools-shell/src/app/InspectableElements/EdgeCaseObjects.js", "packages/react-devtools-shell/src/app/InspectableElements/InspectableElements.js", "packages/react-devtools-shell/src/app/InspectableElements/UnserializableProps.js"]
Error: "f.hasOwnProperty is not a function"
Describe what you were doing when the bug occurred: 1. Open https://codesandbox.io/s/angry-mestorf-cbvdv 2. Open DevTools, and try to inspect the <App> component --------------------------------------------- Please do not remove the text below this line --------------------------------------------- DevTools version: 4.3.0-3e0967783 Call stack: at ha (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:268899) at ii (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59363) at Sl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:107431) at Ic (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:99973) at Tc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:99898) at vc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:96672) at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:46436 at n.unstable_runWithPriority (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:3676) at $o (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:46146) at na (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:46382) Component stack: in ha in div in Ka in div in bi in div in Ai in Suspense in ei in div in div in la in Ur in vo in Unknown in n in Unknown in div in div in Qi in Ve in nn in Da in Yc
https://github.com/facebook/react/issues/17761
https://github.com/facebook/react/pull/17768
5d3d71b1ddbbf5743108c998904f7bb575f4330e
7e2ab87a613b11250fe9678cc111fc8485c8a683
2020-01-03T03:51:53Z
javascript
2020-01-03T17:34:12Z
closed
facebook/react
https://github.com/facebook/react
17,754
["packages/react-devtools-shared/src/__tests__/__snapshots__/inspectedElementContext-test.js.snap", "packages/react-devtools-shared/src/__tests__/inspectedElementContext-test.js", "packages/react-devtools-shared/src/__tests__/legacy/__snapshots__/inspectElement-test.js.snap", "packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js", "packages/react-devtools-shared/src/utils.js", "packages/react-devtools-shell/src/app/InspectableElements/UnserializableProps.js"]
DevTools can't inspect object without prototype
<!-- 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?** 1. Select a component 2. The right panel (property panel?) always shows `Loading...` 3. The following error is printed to the console. ``` backend.js:1 Uncaught TypeError: Cannot read property 'name' of undefined at O (backend.js:1) at s (backend.js:1) at s (backend.js:1) at l (backend.js:1) at Object.inspectElement (backend.js:6) at t.<anonymous> (backend.js:6) at t.r.emit (backend.js:6) at backend.js:32 at t (backend.js:8) ``` ![image](https://user-images.githubusercontent.com/1330321/71661150-497dba00-2d88-11ea-8df1-235f24ba793f.png) I don't know why you minify the output, but the call stack points to here: https://github.com/facebook/react/blob/f887d1aa27336baa0bc292158793a5a244c712b6/packages/react-devtools-shared/src/utils.js#L391 **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/falling-wave-1j0qe **What is the expected behavior?** React DevTools displays the props of the selected component. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** React 16.12.0 Chrome 79.0.3945.88 IDK
https://github.com/facebook/react/issues/17754
https://github.com/facebook/react/pull/17757
2c1e5d2b223a267179954cfe54592a7ba102de10
195b3db61885552b84eacb2ab51502b342d0fa8a
2020-01-02T09:56:13Z
javascript
2020-01-02T16:27:29Z
closed
facebook/react
https://github.com/facebook/react
17,681
["packages/react-devtools-extensions/firefox/build.js", "packages/react-devtools-extensions/src/main.js"]
Re-enable context menu options in Firefox
#17668 disabled support for "copy to clipboard" and "go to definition" context menu items in Firefox. Use cases - [x] copy to clipboard (#17740) - [x] jump to element node (blocked by Firefox bugs [1605597](https://bugzilla.mozilla.org/show_bug.cgi?id=1605597), [1609671](https://bugzilla.mozilla.org/show_bug.cgi?id=1609671), [1609677](https://bugzilla.mozilla.org/show_bug.cgi?id=1609677)) - [x] jump to function definition (blocked by Firefox bugs [1605597](https://bugzilla.mozilla.org/show_bug.cgi?id=1605597), [1609671](https://bugzilla.mozilla.org/show_bug.cgi?id=1609671), [1609677](https://bugzilla.mozilla.org/show_bug.cgi?id=1609677))
https://github.com/facebook/react/issues/17681
https://github.com/facebook/react/pull/17838
3bd6adceda6335adc5f5bbae148dd2ff290eeea6
1e1a98942225771f86d8a81b5ac561a9fbff9263
2019-12-20T18:12:28Z
javascript
2020-01-14T22:00:28Z
closed
facebook/react
https://github.com/facebook/react
17,630
[".circleci/config.yml", "packages/react-devtools-shared/src/__tests__/inspectedElementContext-test.js", "scripts/jest/config.build-devtools.js", "scripts/jest/config.build.js", "scripts/jest/preprocessor.js"]
Fix broken DevTools tests
PR #17599 broke `yarn test-build-devtools`. (b6c423daadaa35da3f34048628df9635505eecb1 is not broken, 0cf22a56a18790ef34c71bef14f64695c0498619 is broken) ``` Configuration error: Could not locate module shared/consoleWithStackDev mapped as: /Users/bvaughn/Documents/git/react/build/node_modules/shared/consoleWithStackDev. Please check your configuration for these entries: { "moduleNameMapper": { "/^shared\/([^\/]+)$/": "/Users/bvaughn/Documents/git/react/build/node_modules/shared/$1" }, "resolver": null } ```
https://github.com/facebook/react/issues/17630
https://github.com/facebook/react/pull/17631
7c21bf72ace77094fd1910cc350a548287ef8350
36a6e29bb3eead85e3500ba7269cbcd55516a8fb
2019-12-16T22:47:59Z
javascript
2019-12-17T00:03:12Z
closed
facebook/react
https://github.com/facebook/react
17,626
["packages/react-devtools-shared/src/hook.js", "packages/react-refresh/src/ReactFreshRuntime.js", "packages/react-refresh/src/__tests__/ReactFresh-test.js"]
react-refresh + ReactDOM: hot reloading only works when bundling React
<!-- 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?** _note: I am encountering this issue when using https://github.com/pmmmwh/react-refresh-webpack-plugin, but I believe it's an issue with react-refresh itself._ The react-refresh runtime [overrides](https://github.com/facebook/react/blob/7c21bf72ace77094fd1910cc350a548287ef8350/packages/react-refresh/src/ReactFreshRuntime.js#L459) `__REACT_DEVTOOLS_GLOBAL_HOOK__.inject` to get a reference to the React renderer. In my app, the `inject` method is never called however, because I load react/react-dom from a third-party CDN before my application code. This means that changed components are never actually refreshed in the DOM. I believe the issue is that scripts are loaded in this order: 1. react-devtools sets up the global hook 2. react/react-dom are loaded on the page, and `inject()` is called 3. user code (which is instrumented with the react-refresh babel plugin) is loaded on the page, and `inject()` is monkey-patched **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:** Follow the usage steps in the https://github.com/pmmmwh/react-refresh-webpack-plugin repo, but also add `react` and `react-dom` as externals in your Webpack build: ``` module.exports = { //... externals: { react: 'React', 'react-dom': 'ReactDOM' } }; ``` then load those scripts onto the page from a CDN (e.g. unpkg or cdnjs) before the Webpack bundle. **What is the expected behavior?** `react-refresh` works the same whether React/ReactDOM are bundled with application code, or loaded via an external script. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** 16.8.6 / Chrome / osx
https://github.com/facebook/react/issues/17626
https://github.com/facebook/react/pull/17633
0253ee9a2e94d43e220a997eeedfcc6847c4542b
c2d1561c60507189b43ae96c6b89580874367e36
2019-12-16T19:39:27Z
javascript
2019-12-17T13:49:39Z
closed
facebook/react
https://github.com/facebook/react
17,624
["packages/react-devtools-shared/src/backend/renderer.js"]
React DevTools might retain references to unmounted DOM elements (and their Fibers)
![Screenshot 2019-12-16 10 51 05](https://user-images.githubusercontent.com/793565/70934095-fd91ed80-1ff1-11ea-93b5-746e816585ec.png) There's seems to be circumstances where unmounted DOM/Fibers are kept alive by React DevTools. They're kept alive in `primaryFibers`: https://github.com/facebook/react/blob/34527063083195558f98108cde10b5d6ad0d6865/packages/react-devtools-shared/src/backend/renderer.js#L772 It seems like a WeakSet would be appropriate and would remove the leak. Otherwise we'd need to understand why recordUnmount isn't called. CC @bvaughn
https://github.com/facebook/react/issues/17624
https://github.com/facebook/react/pull/22346
bc9bb87c2b01bff8a15e02c8416addf6177e9055
f50ff357cf45d5cbda8d5a99c247e33b0477e936
2019-12-16T18:55:33Z
javascript
2021-09-17T16:53:07Z
closed
facebook/react
https://github.com/facebook/react
17,620
["packages/react-devtools-extensions/src/injectGlobalHook.js"]
Firefox React DevTools breaks XML formatting
Steps to reproduce: 1) Disable all add-ons in Firefox 2) Open an URL that points to a XML file 3) AS EXPECTED: A pretty-printed XML is shown 4) Enable the React DevTools Add-on 5) Open the XML file again 6) FAIL: Only the content inside the XML tags are shown Using Firefox Developer Edition 72.0b6 on macOS 10.15.2
https://github.com/facebook/react/issues/17620
https://github.com/facebook/react/pull/17739
0eac01abcd44579db03821347f103c816cd55372
2b903da355fa53b3ac5a7f340134575119de2f40
2019-12-16T13:46:30Z
javascript
2019-12-29T21:02:50Z
closed
facebook/react
https://github.com/facebook/react
17,552
["packages/react-devtools-shared/src/hook.js", "packages/react-refresh/src/ReactFreshRuntime.js", "packages/react-refresh/src/__tests__/ReactFresh-test.js"]
react-refresh load from CDN?
<!-- 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*?** feature **What is the current behavior?** When `react-dom` is loaded from CDN like `<script src="https://cdn.jsdelivr.net/npm/[email protected]/umd/react-dom.development.js"></script>`, `react-refresh` failed to inject hook into devtools. I've created a related issue here: https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/13 We should find a way to invoke `injectIntoGlobalHook` function from `react-refresh/runtime`, however this file is in cjs format so we cannot currently do this in a simple way. **What is the expected behavior?** I'd like `react-refresh` to publish runtime as a umd bundle so we can reference it from CDN and put it before `react-dom`'s `<script>` element, then invoke `injectIntoGlobalHook` in the right place. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** - `react-dom`: 16.12.0 - `react-refresh`: 0.7.0
https://github.com/facebook/react/issues/17552
https://github.com/facebook/react/pull/17633
0253ee9a2e94d43e220a997eeedfcc6847c4542b
c2d1561c60507189b43ae96c6b89580874367e36
2019-12-09T07:42:10Z
javascript
2019-12-17T13:49:39Z
closed
facebook/react
https://github.com/facebook/react
17,532
["packages/react-devtools-shared/src/devtools/views/DevTools.css"]
React Devtools standalone subpanels frozen on version 4.2.1
Verified that version 4.2.0 works well, so a recent regression. Haven't tried to create a small example to reproduce, but since it's a recent bugfix version that should be fairly easy to pinpoint.
https://github.com/facebook/react/issues/17532
https://github.com/facebook/react/pull/17584
22ef96ae63f40b1b9367bc2d8bdb3db33e6943b0
9357a483e9d9581bf65e7e82541cfb6bde84fdb0
2019-12-05T08:40:52Z
javascript
2019-12-29T21:46:27Z
closed
facebook/react
https://github.com/facebook/react
17,522
["packages/react-devtools-shared/src/devtools/views/DevTools.css"]
React Dev Tools Standalone only draggable, not clickable
**Do you want to request a *feature* or report a *bug*?** I want to report a bug. **What is the current behavior?** When running react-devtools standalone on Windows 10, they manage to connect to the React app, but the UI can't be clicked and clicking on it only drags the window. This makes it unusable. I've debuged it using built-in Chrome dev tools and it's due to `-webkit-app-region: drag` applied to body and other elements. As soon as I override this to be `-webkit-app-region: none;` everything starts working fine - you can click on things and you can still drag the window. **What is the expected behavior?** Clicking on the UI should work and not only drag the window. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** I've tested it with React Dev Tools standalone version 4.2.1-3816ae7c3
https://github.com/facebook/react/issues/17522
https://github.com/facebook/react/pull/17584
22ef96ae63f40b1b9367bc2d8bdb3db33e6943b0
9357a483e9d9581bf65e7e82541cfb6bde84fdb0
2019-12-04T09:50:32Z
javascript
2019-12-29T21:46:27Z
closed
facebook/react
https://github.com/facebook/react
17,481
["CHANGELOG.md"]
Changelog markdown formatting issue for v16.3.0 (React Test Renderer)
React Changelog Markdown documentation formatting issue. ## **Do you want to request a *feature* or report a *bug*?** A bug in formatting, where subtitle should be `h3` (with `###`) but is marked with `h2` (`##`). ## **What is the current behavior?** `React Test Renderer` subtitle is rendered as `h2`, not `h3`. ![demo](https://user-images.githubusercontent.com/8465237/69779015-8dbbe000-1174-11ea-87c5-f6a582d9a120.png) ## Finding the formatting error ### Using Chrome Devtools 1. Go to https://github.com/facebook/react/blob/master/CHANGELOG.md#react-test-renderer-3 1. Open Devtools to inspect the HTML. ### Via markdown source 1. Go to https://raw.githubusercontent.com/facebook/react/master/CHANGELOG.md 1. Search for word `* Fix handling of fragments in `toTree()`.` 1. You will see `## React Test Renderer`. - This should be `### React Test Renderer` ![search](https://user-images.githubusercontent.com/8465237/69779171-19357100-1175-11ea-8b79-f5c13909b79b.png) ## **What is the expected behavior?** `React Test Renderer` subtitle is rendered as `h3` with `###`, **not** as `h2` with `##` . ## **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** Not Applicable. ## Additional context It might look like nitpicking but I was programmatically parsing the changelog but ran into the inconsistency. Hopefully this can be fixed because 1. It's easy to fix 1. To prep for automated changelog documentation (for the future possibly). 1. and for _consistency_ Demo Sandbox: https://codesandbox.io/s/parse-react-changelog-mjpkg I can do a PR should you approve ![inconsistency](https://user-images.githubusercontent.com/8465237/69779349-ba242c00-1175-11ea-8f9a-81f7d1ec7fb0.png)
https://github.com/facebook/react/issues/17481
https://github.com/facebook/react/pull/17487
969f4b5bb8302afb3eb1656784130651047c3718
b64938e1234b77c50d9b2680dd836cd27ce5ad91
2019-11-28T05:31:12Z
javascript
2019-11-29T13:57:38Z
closed
facebook/react
https://github.com/facebook/react
17,432
["packages/react-devtools-shared/src/backend/views/TraceUpdates/canvas.js"]
Devtools : highlight box is shown too small.
<!-- 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 Chrome devtools is highlighting highlight box is shown too small. ![image](https://user-images.githubusercontent.com/44562005/69419027-185ca380-0d5f-11ea-8284-8004147dc713.png) **What is the expected behavior?** Highlight box is shown actual template size. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** Chrome 78.0.3904.97 React Developer Tools 4.2.0
https://github.com/facebook/react/issues/17432
https://github.com/facebook/react/pull/18973
f9bf828701e7ba430da45d86f11fde2f93cbc491
c93a6cb4d5d3d6a635680bc71e324417f3c5b65a
2019-11-22T10:43:23Z
javascript
2020-05-21T17:04:37Z
closed
facebook/react
https://github.com/facebook/react
17,356
["packages/react-reconciler/src/ReactFiberBeginWork.new.js", "packages/react-reconciler/src/ReactFiberBeginWork.old.js", "packages/react-reconciler/src/ReactFiberThrow.new.js", "packages/react-reconciler/src/ReactFiberThrow.old.js", "packages/react-reconciler/src/ReactSideEffectTags.js", "packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js"]
Memoized child of Suspense component doesn't update when Context updates.
**Do you want to request a *feature* or report a *bug*?** bug (I think?) **What is the current behavior?** ```javascript const [value, setValue] = useState("default"); return ( <div className="App"> <input value={value} onChange={e => setValue(e.target.value)} /> <div> <Value.Provider value={value}> <Suspense fallback={<div>loading</div>}> <MemoizedChild /> </Suspense> </Value.Provider> </div> </div> ) ``` When using a memoized functional component (`MemoizedChild` in above example) in conjunction with `Context` as a child of a `React.Suspense` component, there seems to be a bug in which `MemoizedChild` does not update when the context it uses changes. For the full example, see my codesandbox below. In the codesandbox, if you change the value of the input, the new value is provided to the context which causes the hook used in `MemoizedChild` (`useValue`) to throw a promise. This flips `Suspense` to the fallback state and when the promise resolves `MemoizedChild`'s state is not updated with the proper context value because (I'm assuming) the memoized value of `MemoizedChild` is the one that contained the previous context value and technically no props have changed, so that makes sense why it wouldn't have updated. However, this seems like it would be unexpected behavior. https://codesandbox.io/s/react-suspense-maybe-bug-sznbk **What is the expected behavior?** I would expect that `MemoizedChild` would be re-rendered with the new provided value. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** I'm assuming all of them that contain Suspense and memo. So, since 16.8?
https://github.com/facebook/react/issues/17356
https://github.com/facebook/react/pull/19216
f4097c1aef173ea0cb873bc18b47d1ef12bab4b3
8bff8987e513486bb96018b80d7edb02d095ed06
2019-11-13T20:11:50Z
javascript
2020-06-30T21:06:46Z
closed
facebook/react
https://github.com/facebook/react
17,321
["packages/react-test-renderer/package.json", "packages/react-test-renderer/shallow.js", "packages/react-test-renderer/src/ReactShallowRenderer.js", "yarn.lock"]
[Shallow Renderer] Plan forward
Let's discuss what to do with the shallow renderer here. As I mentioned in https://github.com/facebook/react/pull/16168#issuecomment-518344985, we aren't using it much and don't consider it a best practice. So we aren't going to be very good stewards of its API going forward. My proposal was for Enzyme or folks interested in it to copy the code into another repo, and continue maintaining it there under a difference package name. It would make sense to Enzyme to start depending on that fork. We would then deprecate `react-test-renderer/shallow` in favor of the community-maintained fork. If you'd like to volunteer to set up a repo, please let us know in this issue! cc @davidmarkclements regarding the proposed `react-shallow-renderer` package name.
https://github.com/facebook/react/issues/17321
https://github.com/facebook/react/pull/18144
abcca4595146aea4259e42f253bed722c843a574
293878e079b170670b08449bfdcd7aebaa6afbc2
2019-11-08T21:54:52Z
javascript
2020-02-27T18:10:25Z
closed
facebook/react
https://github.com/facebook/react
17,273
["packages/react-debug-tools/src/ReactDebugHooks.js", "packages/react-dom/src/server/ReactPartialRendererHooks.js", "packages/react-reconciler/src/ReactFiberHooks.new.js", "packages/react-reconciler/src/ReactFiberHooks.old.js", "packages/react-reconciler/src/ReactFiberThrow.new.js", "packages/react-reconciler/src/ReactFiberThrow.old.js", "packages/react-reconciler/src/ReactFiberTransition.js", "packages/react-reconciler/src/ReactInternalTypes.js", "packages/react/src/ReactBatchConfig.js", "packages/react/src/ReactHooks.js"]
useTransition's startTransition function can result in infinite loop when it's included as a useEffect dependency
**Do you want to request a *feature* or report a *bug*?** Bug **What is the current behavior?** I've narrowed it down to this: https://codesandbox.io/s/usetransition-useeffect-dependency-issue-2olmx Basically, what I *think* is important is: 1. There's a state change resulting in the useEffect being called 2. The useEffect callback starts a transition 3. The transition callback sets state 4. The set state results in a render which suspends If these are all the case, then including the `startTransition` function in the dependency array will trigger an infinite loop. In the codesandbox I have a safety in place so your browser doesn't fall over. **What is the expected behavior?** The `startTransition` function should be consistent between renders. I've observed that if you do not inline the config to `useTransition` then this is not a problem. I know that the docs recommend keeping this config consistent, but if this is desirable behavior, then maybe a warning about this particular situation in the docs would be useful. I expect that inlining the config will be pretty natural for people. **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]
https://github.com/facebook/react/issues/17273
https://github.com/facebook/react/pull/19719
92fcd46cc79bbf45df4ce86b0678dcef3b91078d
ddd1faa1972b614dfbfae205f2aa4a6c0b39a759
2019-11-04T23:12:15Z
javascript
2020-08-28T18:49:01Z
closed
facebook/react
https://github.com/facebook/react
17,272
["packages/react-reconciler/src/ReactFiberHooks.js", "packages/react-reconciler/src/__tests__/ReactTransition-test.internal.js"]
When calling a useTransition startTransition callback outside of event handlers, isPending is never set to true
**Do you want to request a *feature* or report a *bug*?** Bug **What is the current behavior?** `isPending` is never set to true when calling `startTransition` within `useEffect`, but it *does* work properly when within a `useLayoutEffect`. https://codesandbox.io/s/usetransition-useeffect-issues-p1j9s Here's the correct behavior (accomplished via `useLayoutEffect`): ![good](https://user-images.githubusercontent.com/1500684/68164575-662d7b00-ff1a-11e9-9d02-71d7a22fd5cf.gif) Here's the incorrect behavior (via `useEffect`): ![bad](https://user-images.githubusercontent.com/1500684/68164540-4c8c3380-ff1a-11e9-9191-d9c87ddecbed.gif) Note the difference is that the opacity never changes to 0.4 (which is determined based on the `isPending` state). **What is the expected behavior?** I expect them to both behave the same (at least as far as the user can observe). **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]
https://github.com/facebook/react/issues/17272
https://github.com/facebook/react/pull/17382
8e74a31b2d0017061e265ae1a3fbfbacb7af5614
2586303662736d72e79046b51c8df993b21e6093
2019-11-04T22:49:03Z
javascript
2019-11-15T23:46:09Z
closed
facebook/react
https://github.com/facebook/react
17,237
["packages/react-refresh/src/ReactFreshBabelPlugin.js", "packages/react-refresh/src/__tests__/ReactFreshBabelPlugin-test.js", "packages/react-refresh/src/__tests__/__snapshots__/ReactFreshBabelPlugin-test.js.snap"]
react-refresh: add options to override $RefreshReg$ and $RefreshSig$ for better System.js integration
**Do you want to request a *feature* or report a *bug*?** Feature Right now babel plugin emits globals: https://github.com/facebook/react/issues/16604 ```js window.$RefreshReg$ = () => {}; window.$RefreshSig$ = () => type => type; ``` It would be nice to have them configurable. That would allow to use `import.meta` in environments like SystemJS and have simpler implementation: ```js import runtime from 'react-refresh/runtime' runtime.injectIntoGlobalHook(window) System.constructor.prototype.createContext = function (url) { return { url, $RefreshSig$: runtime.createSignatureFunctionForTransform, $RefreshReg$: (type, id) => { id = url + ' ' + id runtime.register(type, id) } }; }; ``` If you don't mind I could create PR with changes to react-refresh/babel next week. environment: ```js { "systemjs": "^6.1.4", "react": "^16.11.0", "react-dom": "^16.11.0", "react-refresh": "^0.6.0" } ```
https://github.com/facebook/react/issues/17237
https://github.com/facebook/react/pull/17340
ade764157ff7ff27ab11ed8b61791a7edef8e683
f4cc45ce962adc9f307690e1d5cfa28a288418eb
2019-10-31T12:41:06Z
javascript
2019-11-12T14:16:23Z
closed
facebook/react
https://github.com/facebook/react
17,229
["packages/legacy-events/EventPluginHub.js", "packages/react-dom/src/__tests__/ReactBrowserEventEmitter-test.internal.js"]
onMouseEnter is fired on disabled buttons
<!-- 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?** `onMouseEnter` is fired on `disabled` buttons. **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/react-onmouseenter-on-disabled-buttons-fskwd **What is the expected behavior?** `onMouseEnter` shouldn't be triggered on `disabled` buttons. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** React 16.11.0 (not sure when it started to happen) Chrome/MacOS
https://github.com/facebook/react/issues/17229
https://github.com/facebook/react/pull/17675
2078aa9a401aa91e97b42cdd36a6310888128ab2
812277dab6b449596288825d59184dfc1acdf370
2019-10-30T21:31:43Z
javascript
2020-02-04T14:56:55Z
closed
facebook/react
https://github.com/facebook/react
17,220
["packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js", "packages/eslint-plugin-react-hooks/src/RulesOfHooks.js"]
[eslint-plugin-react-hooks] Apply the rules of hooks to a forwardRef-wrapped component
<!-- 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*?** Feature (to catch potential bugs) **What is the current behavior?** The react-hooks/rules-of-hooks ESLint rule catches uses of hooks in conditionals in components, but does not recognise an anonymous function wrapped in forwardRef as a component. The following example breaks the rules of hooks, but isn't caught by the rule: ```jsx // This should fail const FancyButton = React.forwardRef((props, ref) => { if (props.fancy) { useCustomHook(); } return <button ref={ref}>{props.children}</button>; }); ``` **What is the expected behavior?** The above example should be caught by react-hooks/rules-of-hooks, and raise the "React Hook "useCustomHook" is called conditionally" error.
https://github.com/facebook/react/issues/17220
https://github.com/facebook/react/pull/17255
2586303662736d72e79046b51c8df993b21e6093
a807c307c496d96e8ff79f53cf2d6203c45cf0c6
2019-10-30T11:56:28Z
javascript
2019-11-17T13:39:08Z
closed
facebook/react
https://github.com/facebook/react
17,207
["packages/react-devtools-shared/src/__tests__/__snapshots__/inspectedElementContext-test.js.snap", "packages/react-devtools-shared/src/__tests__/inspectedElementContext-test.js", "packages/react-devtools-shared/src/__tests__/legacy/__snapshots__/inspectElement-test.js.snap", "packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js", "packages/react-devtools-shared/src/devtools/views/utils.js", "packages/react-devtools-shared/src/hydration.js"]
Bug: react-devtools TypeError: Do not know how to serialize a BigInt
**What is the current behavior?** TypeError: Do not know how to serialize a BigInt which makes it so the react dev tools cannot inspect the component props. Steps to reproduce 1. Set a component prop to some value of type `BigInt`. 2. Open Chrome DevTools, then React Components view, try inspecting the component 3. There will be an exception [here](https://github.com/facebook/react/blob/b438699d3620bff236282b049204e1221b3689e9/packages/react-devtools-extensions/src/contentScript.js#L28-L38) (with the message above) You can repro this with the following https://codesandbox.io/s/mystifying-cache-jshv3 Note that you need to repo via Chrome DevTools so that the bridge is active, if you use the codesandbox built-in DevTools the behavior is different. **What is the expected behavior?** That bigints are handled in a similar way to how symbols are handled. So that they don't crash when they cross a boundary, i.e. postMessage. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** Latest version, hasn't worked before. That I know. Tested in Chrome and Firefox, although the behavior isn't exactly the same in Firefox as in Chrome, it doesn't appear to work in Firefox either. I would like to propose a fix for this but I cannot find where in the source this would go. I don't care for editing capabilities and such, I just don't want the dev tools to give up on my just because I have BigInts in my code.
https://github.com/facebook/react/issues/17207
https://github.com/facebook/react/pull/17233
5064c7f6aa2b46469ac601cc851640e91ec340a9
5235d193d70d2623c98788ccb8dffc1d5abd688d
2019-10-29T12:07:08Z
javascript
2019-12-04T15:53:00Z
closed
facebook/react
https://github.com/facebook/react
17,170
["packages/react-dom/src/__tests__/ReactServerRenderingHydration-test.js", "packages/react-dom/src/client/ReactDOMComponent.js"]
dangerouslySetInnerHTML, children, and a bogus hydration warning
<!-- 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 (initially reported at https://github.com/zeit/next.js/issues/9173). **What is the current behavior?** If a component has both `dangerouslySetInnerHTML` and `children` props, and the component is used with just the `children` prop, on page load the client logs a warning beginning with ``Warning: Prop `dangerouslySetInnerHTML` did not match.``. Interestingly: - If just `dangerouslySetInnerHTML` is used there is no warning. - Multiple instances with just a `children` prop results in only one warning, for the first occurance. **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: https://codesandbox.io/s/react-hydration-warning-demo-3je59 In a Next.js project, create a page with the following content: ```jsx const TestComponent = ({ dangerouslySetInnerHTML, children }) => ( <div dangerouslySetInnerHTML={dangerouslySetInnerHTML} children={children} /> ) export default () => <TestComponent>a</TestComponent> ``` Loading the page in a browser will result in this warning logging to the console: ``` Warning: Prop `dangerouslySetInnerHTML` did not match. Server: "a" Client: "" ``` Note that the hydration warning is bogus; using view source and the inspector you can see the SSR and client rendered HTML is identical and correct. This works just the same as before but without a hydration warning: ```jsx const TestComponent = ({ dangerouslySetInnerHTML, children }) => { const divProps = {} if (dangerouslySetInnerHTML) divProps.dangerouslySetInnerHTML = dangerouslySetInnerHTML if (children) divProps.children = children return <div {...divProps} /> } ``` **What is the expected behavior?** There should be no hydration warning at first client render. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** Not sure if the bug is present in old versions of React, but it can be seen with v16.11.0.
https://github.com/facebook/react/issues/17170
https://github.com/facebook/react/pull/18676
1078029af6ecf9f85c5235e4323b853b78d86da0
ffb6c6c07b1a6dcabd04b22a6a5afeab96d53ae2
2019-10-23T11:13:04Z
javascript
2020-04-20T17:46:55Z
closed
facebook/react
https://github.com/facebook/react
17,151
["packages/react-reconciler/src/ReactFiberBeginWork.js", "packages/react-reconciler/src/ReactFiberClassComponent.js", "packages/react-reconciler/src/__tests__/ReactLazy-test.internal.js"]
Bailing out doesn't work properly in lazy components with default props
<!-- 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?** Bailing out doesn't work properly in lazy components with default props. It seems we're incorrectly [comparing unresolved props (oldProps) with resolved props (newProps)](https://github.com/facebook/react/blob/62b04cfa753076d5ffb1d74b855f8f8db36f5186/packages/react-reconciler/src/ReactFiberClassComponent.js#L1100). **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/stoic-curran-3otbb **What is the expected behavior?** In the example above, `componentDidUpdate` shouldn't have been called when the button is clicked. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
https://github.com/facebook/react/issues/17151
https://github.com/facebook/react/pull/18539
2dddd1e00cdadad1783aa55ac65a28634590e9c1
241103a6fb8544077579c4c1458f367510d92934
2019-10-20T15:58:13Z
javascript
2020-04-08T09:58:57Z
closed
facebook/react
https://github.com/facebook/react
17,134
["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/backend/renderer.js"]
React Devtools should produce a better error message when integers are present as keys on react elements
Current behavior: React Devtools throws "RangError: Invalid Array Length" when integers are used as keys on react elements. Example: https://codesandbox.io/s/interesting-violet-v5c5j https://v5c5j.csb.app/ Using anything but strings as keys is as far as I understand not even correct usage, but it would be great if react devtools checked a little bit earlier and had a nicer error than "RangeError: Invalid Array Length." It takes a long time to figure out from this message that one somehow managed to use integers as keys and needs to correct it. I've only tested with Chrome and the latest version of react devtools as a chrome extension.
https://github.com/facebook/react/issues/17134
https://github.com/facebook/react/pull/17164
0f64703edf5970b12a878ea3b5e1e30ef1d71c74
3497ccc14929f6d69d8d48ef41d0b34d1751ce9d
2019-10-18T08:42:25Z
javascript
2019-10-29T15:41:48Z
closed
facebook/react
https://github.com/facebook/react
17,073
["packages/react-devtools-shared/src/__tests__/__snapshots__/inspectedElementContext-test.js.snap", "packages/react-devtools-shared/src/__tests__/inspectedElementContext-test.js", "packages/react-devtools-shared/src/__tests__/legacy/__snapshots__/inspectElement-test.js.snap", "packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js", "packages/react-devtools-shared/src/devtools/views/Components/KeyValue.js", "packages/react-devtools-shared/src/devtools/views/utils.js", "packages/react-devtools-shared/src/hydration.js", "packages/react-devtools-shared/src/utils.js", "packages/react-devtools-shell/src/app/InspectableElements/UnserializableProps.js"]
[DevTools] polish hooks: complex values preview
We create many `useDebugValue` helpers, loggers and so one now, so we can feel less pain. What matter (**Updated**) - previewing complex values brifely like chrome devtools does it for arrays, sets, maps, objects,,, I [wrote related twit](https://twitter.com/mxtnr/status/1178271362890240001) recently with one of my DebugValue helpers. screenshot out here: <img width="556" alt="Screenshot 2019-09-29 at 14 01 53" src="https://user-images.githubusercontent.com/6201068/66700775-5648bf80-ecfd-11e9-93fe-089d451bcffa.png"> _my named hooks currently require a `label` option unless react babel cannot transform name of variable automatically_
https://github.com/facebook/react/issues/17073
https://github.com/facebook/react/pull/17579
2afeebdcc4ed8a78ab5b36792f768078d70e1ffd
12c000412d05c4a6079b4f57f721a40b8cea374d
2019-10-12T11:32:51Z
javascript
2019-12-12T01:52:17Z
closed
facebook/react
https://github.com/facebook/react
17,069
["packages/react-dom/src/__tests__/DOMPropertyOperations-test.js", "packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js", "packages/react-dom/src/__tests__/ReactDOMInput-test.js", "packages/react-dom/src/client/ReactDOMInput.js"]
The warning for uncontrolled -> controlled inputs is confusing
<!-- 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? Mild DX improvement. **What is the current behavior?** Creating an input with an undefined or null value, then later passing a string value, triggers a warning about controlled inputs. > A component is changing an uncontrolled input of type undefined to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa) It's my experience in Reactiflux that this warning is unclear to developers with less familiarity with React, or at least with the "controlled" and "uncontrolled" terms.
https://github.com/facebook/react/issues/17069
https://github.com/facebook/react/pull/17070
ddc4b65cfe17b3f08ff9f18f8804ff5b663788c8
03de849af03996b7477420c97de7741ce1214149
2019-10-11T20:10:26Z
javascript
2020-04-07T22:19:56Z
closed
facebook/react
https://github.com/facebook/react
16,994
["packages/react-reconciler/src/ReactFiberBeginWork.js", "packages/react/src/__tests__/ReactProfiler-test.internal.js"]
Profiler calling onRender for component updates outside of the Profiler tree
[From the Profiler docs](https://reactjs.org/docs/profiler.html#onrender-callback): > The Profiler requires an onRender function as a prop. React calls this function any time a component within the profiled tree “commits” an update. However, given: ```jsx import React from 'react' import ReactDOM from 'react-dom' function Counter() { const [count, setCount] = React.useState(0) const increment = () => setCount(c => c + 1) return <button onClick={increment}>{count}</button> } function App() { return ( <div> <React.Profiler id="counter" onRender={() => console.log('called')} > <div> Profiled counter <Counter /> </div> </React.Profiler> <div> Unprofiled counter <Counter /> </div> </div> ) } ReactDOM.render(<App />, document.getElementById('root')) ``` I'm getting a log when I click on the unprofiled counter. Reproduction: https://codesandbox.io/s/react-codesandbox-tnff6 Am I misunderstanding this API, or is this a bug?
https://github.com/facebook/react/issues/16994
https://github.com/facebook/react/pull/17223
8eee0eb01ce3ead0f51ade75fdcf062a748d57a7
9a35adc96d6ff99de779aee52bb78d3c24f86c1d
2019-10-02T22:11:37Z
javascript
2019-10-30T18:08:42Z
closed
facebook/react
https://github.com/facebook/react
16,980
["packages/react-devtools-shared/src/__tests__/__snapshots__/profilingCache-test.js.snap", "packages/react-devtools-shared/src/__tests__/profilerStore-test.js", "packages/react-devtools-shared/src/__tests__/profilingCache-test.js", "packages/react-devtools-shared/src/backend/renderer.js"]
React DevTools recording commit without any component re-render
I'm struggling to make an isolated example of this, but the app where I found this is pretty simple so hopefully it's not too challenging to track down. So I was profiling https://the-react-bookshelf.netlify.com (locally) and got this when I clicked on the "login" button: ![image](https://user-images.githubusercontent.com/1500684/66011343-fe4dc580-e47f-11e9-9220-50ba884640f3.png) ![image](https://user-images.githubusercontent.com/1500684/66011358-0dcd0e80-e480-11e9-80fb-86c0f2196ef9.png) The fact that there was no profile data for a commit is interesting. Each commit should be associated to a state update somewhere in the tree, and wherever that happened should trigger at least one component to re-render, but that didn't appear to happen here. I also verified that I don't have any components filtered out: ![image](https://user-images.githubusercontent.com/1500684/66011428-57b5f480-e480-11e9-9e66-7cf86f8ba48f.png) And I didn't filter any commits either: ![image](https://user-images.githubusercontent.com/1500684/66011433-5ab0e500-e480-11e9-97a8-be202351870d.png) Here's the exported profile data: https://gist.github.com/kentcdodds/dbff66043653333cd22cb9261a08550b And here's the repo where you can pull it down and reproduce yourself: https://github.com/kentcdodds/bookshelf. The component we're looking at is here: https://github.com/kentcdodds/bookshelf/blob/master/src/unauthenticated-app.js Sorry I can't give a more direct reproduction.
https://github.com/facebook/react/issues/16980
https://github.com/facebook/react/pull/22745
e0aa5e205feee53043ce1ae8726fe732866e6ea7
a44a7a2a3f8d7b24ddf5d0c6efeb6127e6b395c3
2019-10-02T01:20:38Z
javascript
2021-11-11T15:35:16Z
closed
facebook/react
https://github.com/facebook/react
16,938
["packages/react-dom/src/__tests__/ReactServerRenderingHydration-test.js", "packages/react-reconciler/src/ReactFiberHydrationContext.js"]
React 16.10 broke Next.js/SSR applications
**Do you want to request a *feature* or report a *bug*?** Bug **What is the current behavior?** React 16.10.0 has broken all Next.js applications (and potentially other SSR solutions). It appears you cannot `hydrate` in conjunction with a client-side `<Suspense>` component. > Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue. ![image](https://user-images.githubusercontent.com/616428/65810696-7f087b00-e17b-11e9-9957-3481fb5853e3.png) **CodeSandbox**: https://codesandbox.io/s/i66g1 **What is the expected behavior?** Not entirely sure -- I'm opening this issue to discuss. The provided example worked in React 16.9.0 (and prior releases containing Suspense). **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]` is broken. `[email protected]`/`[email protected]` works.
https://github.com/facebook/react/issues/16938
https://github.com/facebook/react/pull/16943
9d637844e9761a29a49bc53a9b41244d683f89e3
d8a76ad5804197108f18b988f6d13c767ab41387
2019-09-28T03:18:10Z
javascript
2019-09-28T17:43:53Z
closed
facebook/react
https://github.com/facebook/react
16,859
["packages/react-devtools-shared/src/devtools/views/Components/EditableValue.js", "packages/react-devtools-shared/src/devtools/views/Components/HooksTree.js", "packages/react-devtools-shared/src/devtools/views/Components/KeyValue.js", "packages/react-devtools-shared/src/devtools/views/hooks.js"]
DevTools: hooks with numbers, strings or booleans show as undefined
**Do you want to request a *feature* or report a *bug*?** Report a bug **What is the current behavior?** The `useState` hook's value is shown as `undefined` in React DevTools if the value is a string or a number. Clicking on the bug icon prints the correct values to console. ![image](https://user-images.githubusercontent.com/21111572/65421153-b7225d80-de0b-11e9-8a69-a31836a41c7c.png) **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.** CodeSandbox: https://codesandbox.io/s/keen-colden-syb7r Direct link to page so you can see the DevTools: https://2km9v.csb.app/ **What is the expected behavior?** The DevTools should show the correct value of the hook. **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. Google Chrome [Version 77.0.3865.90 (Official Build) (64-bit)] running on Linux x64. This issue appeared after version 4.1.0 (9/19/2019) of the DevTools Chrome extension. Might be same bug as #16843 but this one appears without any complicated reproduction steps.
https://github.com/facebook/react/issues/16859
https://github.com/facebook/react/pull/16867
1a6294d3e2254f03267da3412becbe51188e830f
9b3cde9b627e91f9d4a81093384d579928474c37
2019-09-23T11:12:10Z
javascript
2019-09-23T19:56:01Z
closed
facebook/react
https://github.com/facebook/react
16,832
["packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js", "packages/eslint-plugin-react-hooks/src/RulesOfHooks.js"]
eslint-plugin-react-hooks: 'Hook is being called conditionally' error outside condition
<!-- 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 (possibly) **What is the current behavior?** The plugin is showing this error: >React Hook "useState" is called conditionally. React Hooks must be called in the exact same order in every component render. Did you accidentally call a React Hook after an early return? (react-hooks/rules-of-hooks)eslint But I don't think I'm calling any hooks conditionally. The code: https://codesandbox.io/s/exciting-bhabha-mqj7q ``` function App(props) { const someObject = { propA: true, propB: false }; for (const propName in someObject) { if (propName === true) { console.log("something"); } else { console.log("whatever"); } } // THE PLUGIN ERROR MSG ON THIS useState const [myState, setMyState] = useState(null); return ( <div className="App"> <h1>Hello CodeSandbox</h1> <h2>Start editing to see some magic happen!</h2> </div> ); } ``` ![image](https://user-images.githubusercontent.com/43407798/65239956-10bb1d00-dad8-11e9-88b9-ec517cd17645.png) **What is the expected behavior?** The plugin wouldn't show the error in this situation. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** ![image](https://user-images.githubusercontent.com/43407798/65240081-5a0b6c80-dad8-11e9-8692-a9974342130e.png)
https://github.com/facebook/react/issues/16832
https://github.com/facebook/react/pull/16853
0e49074f7a5ba3981ffd28387c8b7f891c7bad24
bf13d3e3c6632acad4e7fce1bc93df336cb57acc
2019-09-19T11:26:39Z
javascript
2020-02-25T11:38:23Z