Last 12 weeks · 168 commits
5 of 6 standards met
Summary Fixes https://github.com/vitejs/vite-plugin-react/issues/1006 I'm not sure a lot of users do nest hooks at the second level, but the added complexity to the Babel plugin fells low enough to add support to it. Before this change, the signature for the test would have been which would force reset on HMR.
Do you want to request a feature or report a bug? Bug What is the current behavior? In React 16, a text input with a value and autofocus will set the cursor at the _end_ of the input. `` If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below: See the React 16 repro here: https://codepen.io/matthewg0/pen/XymjYo What is the expected behavior? In React 15, and in plain HTML, the behavior is that the cursor is placed at the _start_ of the input. React 15: https://codepen.io/matthewg0/pen/NEGRzv Plain HTML: https://codepen.io/matthewg0/pen/wQKoap Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** Reproduces as of React 16. Worked as expected in React 15.
Summary Adds an official opt-out mechanism to suppress the "Download the React DevTools for a better development experience" console message. Fixes #24283. Approach The fix introduces a property on the pre-existing object. When set to before React loads: 1. The DevTools download prompt in / is skipped via a new guard. 2. A bare placeholder hook with only does not trigger the legacy "DevTools too old" warning in — the reconciler recognizes it as an intentional suppression flag, not an unsupported hook. 3. Real hooks that set still inject and function normally. This avoids the brittle workaround of fully overriding which can break DevTools entirely. Usage Place this before any React script on the page. Changed Files Test Results — PASS: 20 tests passed (including 2 new) — PASS: 3 tests passed — No whitespace errors
Repository: react/react. Description: The library for web and native user interfaces. Stars: 249114, Forks: 51286. Primary language: JavaScript. Languages: JavaScript (49.6%), Rust (25.9%), TypeScript (22.4%), HTML (1%), CSS (0.8%). License: MIT. Homepage: https://react.dev Topics: declarative, frontend, javascript, library, react, ui. Latest release: v19.2.8 (1mo ago). Open PRs: 100, open issues: 1242. Last activity: 1d ago. Community health: 100%. Top contributors: sebmarkbage, zpao, gaearon, acdlite, sophiebits, josephsavona, poteto, eps1lon, jimfb, trueadm and others.