new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

React · API reference · all subjects

breaking changes

24 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

React 19 deprecates react-test-renderer

react-test-renderer is deprecated in React 19 and now logs a deprecation warning and uses concurrent rendering. Applications should migrate to @testing-library/react or @testing-library/react-native instead.

React 19 removes UMD builds

React 19 no longer produces UMD builds. To load React with a script tag, use an ESM-based CDN such as esm.sh.

React 19 renames SECRET_INTERNALS suffix

In React 19, the SECRET_INTERNALS suffix is renamed to _DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE to reflect the impact of using internals and discourage usage.

React 19 removes unmountComponentAtNode

ReactDOM.unmountComponentAtNode is removed in React 19. Code must migrate to root.unmount() where root is the return value from createRoot or hydrateRoot.

React 19 removes ReactDOM.findDOMNode

ReactDOM.findDOMNode is removed in React 19. Code should use useRef to access DOM elements directly instead.

React 19 deprecates element.ref in favor of element.props.ref

In React 19, accessing element.ref is deprecated. ref is now a regular prop accessible via element.props.ref.

React 19 removes propTypes and defaultProps from function components

In React 19, PropTypes checks are removed from the React package and propTypes will be silently ignored. defaultProps is also removed from function components in favor of ES6 default parameters. Class components will continue to support defaultProps.

React 19 removes Legacy Context contextTypes and getChildContext

In React 19, Legacy Context using contextTypes and getChildContext in class components is removed. Applications must migrate to the modern Context API using React.createContext() and Context.Provider.

React 19 removes string refs

String refs are removed in React 19. Class components using string refs like ref='input' must migrate to ref callbacks like ref={input => this.input = input}.

React 19 removes module pattern factories

React 19 removes support for module pattern factories that return an object with a render method. Components must be regular functions returning JSX directly.

React 19 removes createFactory

React.createFactory is removed in React 19. Code using createFactory('button') must be replaced with JSX syntax like <button />.

React 19 removes react-test-renderer/shallow

react-test-renderer/shallow is removed in React 19. Applications must install react-shallow-renderer directly and import from it instead.

React 19 moves act from react-dom/test-utils to react

In React 19, act is moved from react-dom/test-utils to the react package. Code must import act from 'react' instead of 'react-dom/test-utils'.

React 19 removes ReactDOM.render

ReactDOM.render is removed in React 19. Code must migrate to ReactDOM.createRoot(container).render(<App />).

React 19 removes ReactDOM.hydrate

ReactDOM.hydrate is removed in React 19. Code must migrate to ReactDOM.hydrateRoot(container, <App />).

React 19 removes unstable_flushControlled

React 19 removes the unstable_flushControlled API from react-dom.

React 19 removes unstable_createEventHandle

React 19 removes the unstable_createEventHandle API from react-dom.

React 19 removes unstable_renderSubtreeIntoContainer

React 19 removes the unstable_renderSubtreeIntoContainer API from react-dom.

React 19 removes unstable_runWithPriority

React 19 removes the unstable_runWithPriority API from react-dom.

React 19 errors in render not re-thrown

In React 19, errors thrown during render are not re-thrown. Uncaught errors are reported to window.reportError and caught errors to console.error. This reduces duplicate error logs compared to previous versions.

React 19 new JSX transform required

React 19 requires the new JSX transform introduced in 2020 for improvements like ref as a prop and JSX speed optimizations. Using an outdated JSX transform will generate a warning to enable the modern JSX transform.

React 19 removes all react-dom/test-utils exports except act

In React 19, all react-dom/test-utils functions except act are removed. The act function is moved to the react package. Other test utilities have been removed as they depended on low-level React implementation details.

React 19 error for javascript URLs in src and href

React 19 errors when javascript URLs are used in src and href attributes on react-dom elements.

React 19 removes errorInfo.digest from onRecoverableError

In React 19, errorInfo.digest is removed from the onRecoverableError callback in react-dom.

Give your agent this brain