chore(deps): update react monorepo to v19 #8
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "renovate/react-monorepo"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
18.0.9
->19.0.3
18.0.5
->19.0.2
18.1.0
->19.0.0
18.1.0
->19.0.0
Release Notes
facebook/react (react)
v19.0.0
Compare Source
Below is a list of all new features, APIs, deprecations, and breaking changes. Read React 19 release post and React 19 upgrade guide for more information.
New Features
React
startTransition
can now accept async functions. Functions passed tostartTransition
are called “Actions”. A given Transition can include one or more Actions which update state in the background and update the UI with one commit. In addition to updating state, Actions can now perform side effects including async requests, and the Action will wait for the work to finish before finishing the Transition. This feature allows Transitions to include side effects likefetch()
in the pending state, and provides support for error handling, and optimistic updates.useActionState
: is a new hook to order Actions inside of a Transition with access to the state of the action, and the pending state. It accepts a reducer that can call Actions, and the initial state used for first render. It also accepts an optional string that is used if the action is passed to a formaction
prop to support progressive enhancement in forms.useOptimistic
: is a new hook to update state while a Transition is in progress. It returns the state, and a set function that can be called inside a transition to “optimistically” update the state to expected final value immediately while the Transition completes in the background. When the transition finishes, the state is updated to the new value.use
: is a new API that allows reading resources in render. In React 19,use
accepts a promise or Context. If provided a promise,use
will suspend until a value is resolved.use
can only be used in render but can be called conditionally.ref
as a prop: Refs can now be used as props, removing the need forforwardRef
.React DOM Client
<form> action
prop: Form Actions allow you to manage forms automatically and integrate withuseFormStatus
. When a<form> action
succeeds, React will automatically reset the form for uncontrolled components. The form can be reset manually with the newrequestFormReset
API.<button> and <input> formAction
prop: Actions can be passed to theformAction
prop to configure form submission behavior. This allows using different Actions depending on the input.useFormStatus
: is a new hook that provides the status of the parent<form> action
, as if the form was a Context provider. The hook returns the values:pending
,data
,method
, andaction
.<head>
section of the document.<head>
on the client before revealing the content of a Suspense boundary that depends on that stylesheet.preinit
,preload
,prefetchDNS
, andpreconnect
APIs to optimize initial page loads by moving discovery of additional resources like fonts out of stylesheet loading. They can also be used to prefetch resources used by an anticipated navigation.React DOM Server
prerender
andprerenderToNodeStream
APIs for static site generation. They are designed to work with streaming environments like Node.js Streams and Web Streams. UnlikerenderToString
, they wait for data to load for HTML generation.React Server Components
Deprecations
element.ref
access: React 19 supports ref as a prop, so we’re deprecatingelement.ref
in favor ofelement.props.ref
. Accessing will result in a warning.react-test-renderer
: In React 19, react-test-renderer logs a deprecation warning and has switched to concurrent rendering for web usage. We recommend migrating your tests to @testing-library/react or @testing-library/react-nativeBreaking Changes
React 19 brings in a number of breaking changes, including the removals of long-deprecated APIs. We recommend first upgrading to
18.3.1
, where we've added additional deprecation warnings. Check out the upgrade guide for more details and guidance on codemodding.React
onUncaughtError
andonCaughtError
methods tocreateRoot
andhydrateRoot
to customize this error handling.propTypes
: UsingpropTypes
will now be silently ignored. If required, we recommend migrating to TypeScript or another type-checking solution.defaultProps
for functions: ES6 default parameters can be used in place. Class components continue to supportdefaultProps
since there is no ES6 alternative.contextTypes
andgetChildContext
: Legacy Context for class components has been removed in favor of thecontextType
API.React.createFactory
: Now that JSX is broadly supported, allcreateFactory
usage can be migrated to JSX components.react-test-renderer/shallow
: This has been a re-export of react-shallow-renderer since React 18. If needed, you can continue to use the third-party package directly. We recommend using @testing-library/react or @testing-library/react-native instead.React DOM
react-dom/test-utils
: We’ve movedact
fromreact-dom/test-utils
to react. All other utilities have been removed.ReactDOM
.render
,ReactDOM
.hydrate
: These have been removed in favor of the concurrent equivalents:ReactDOM
.createRoot
andReactDOM.hydrateRoot
.unmountComponentAtNode
: Removed in favor ofroot.unmount()
.ReactDOM
.findDOMNode
: You can replaceReactDOM
.findDOMNode
with DOM Refs.Notable Changes
React
<Context>
as a provider: You can now render<Context>
as a provider instead of<Context.Provider>
.useDeferredValue
initial value argument: When provided,useDeferredValue
will return the initial value for the initial render of a component, then schedule a re-render in the background with thedeferredValue
returned.useMemo
anduseCallback
will now reuse the memoized results from the first render, during the second render. Additionally, StrictMode will now double-invoke ref callback functions on initial mount.React DOM
TypeScript Changes
The most common changes can be codemodded with
npx types-react-codemod@latest preset-19 ./path-to-your-react-ts-files
.ReactChild
(replacement:React.ReactElement | number | string)
ReactFragment
(replacement:Iterable<React.ReactNode>
)ReactNodeArray
(replacement:ReadonlyArray<React.ReactNode>
)ReactText
(replacement:number | string
)VoidFunctionComponent
(replacement:FunctionComponent
)VFC
(replacement:FC
)prop-types
:Requireable
,ValidationMap
,Validator
,WeakValidationMap
create-react-class
:ClassicComponentClass
,ClassicComponent
,ClassicElement
,ComponentSpec
,Mixin
,ReactChildren
,ReactHTML
,ReactSVG
,SFCFactory
useRef
: The initial argument is now required to matchuseState
,createContext
etcuseRef()
are now always mutable instead of sometimes being immutable. This feature was too confusing for users and conflicted with legit cases where refs were managed by React and manually written to.ReactElement
typing: The props of React elements now default tounknown
instead ofany
if the element is typed asReactElement
JSX
namespace is removed to improve interoperability with other libraries using JSX. Instead, the JSX namespace is available from the React package:import { JSX } from 'react'
useReducer
typings: MostuseReducer
usage should not require explicit type arguments.For example, or
All Changes
React
useActionState()
hook to update state based on the result of a Form Action (#27270, #27278, #27309, #27302, #27307, #27366, #27370, #27321, #27374, #27372, #27397, #27399, #27460, #28557, #27570, #27571, #28631, #28788, #29694, #29695, #29694, #29665, #28232, #28319 by @acdlite, @eps1lon, and @rickhanlonii)use()
API to read resources in render (#25084, #25202, #25207, #25214, #25226, #25247, #25539, #25538, #25537, #25543, #25561, #25620, #25615, #25922, #25641, #25634, #26232, #26536, #26739, #28233 by @acdlite, @MofeiZ, @sebmarkbage, @sophiebits, @eps1lon, and @hansottowirtz)useOptimistic()
hook to display mutated state optimistically during an async mutation (#26740, #26772, #27277, #27453, #27454, #27936 by @acdlite)initialValue
argument touseDeferredValue()
hook (#27500, #27509, #27512, #27888, #27550 by @acdlite)element.ref
access (#28348, #28464, #28731 by @acdlite)<Context>
to mean<Context.Provider>
(#28226 by @gaearon)info
,group
, andgroupCollapsed
in StrictMode logging (#25172 by @timneutkens)useSyncExternalStore()
hydration in StrictMode (#26791 by @sophiebits)componentWillUnmount()
in StrictMode (#26842 by @tyao1)useState()
anduseReducer()
initializer functions in StrictMode (#28248 by @eps1lon)useId()
in StrictMode (#25713 by @gnoff)act()
no longer checksshouldYield
which can be inaccurate in test environments (#26317 by @acdlite)react.element
symbol toreact.transitional.element
(#28813 by @sebmarkbage)useSyncExternalStore()
re-render (#27199 by @acdlite)useSyncExternalStore()
dropped update when state is dispatched in render phase (#25578 by @pandaiolo)RefreshRuntime.findAffectedHostInstances
(#30538 by @gaearon)cache()
API (#27977, #28250 by @acdlite and @gnoff)propTypes
(#28324, #28326 by @gaearon)defaultProps
support, except for classes (#28733 by @acdlite)createFactory
(#27798 by @kassens)React DOM
useFormStatus()
hook to provide status information of the last form submission (#26719, #26722, #26788, #29019, #28728, #28413 by @acdlite and @eps1lon)preinit
,preinitModule
,preconnect
,prefetchDNS
,preload
, andpreloadModule
APIs.fetchPriority
to<img>
and<link>
(#25927 by @styfle)transformOrigin
prop (#26130 by @arav-ind)onScrollEnd
event (#26789 by @devongovett)<hr>
as child of<select>
(#27632 by @SouSingh)inert
(#24730 by @eps1lon)imageSizes
andimageSrcSet
(#22550 by @eps1lon)flushSync
exhausts queue even if something throws (#26366 by @acdlite)react
andreact-dom
versions don’t match (#29236 by @acdlite)srcset
andsrc
are assigned last on<img>
instances (#30340 by @gnoff)src
andhref
attributes (unless for<a href=”” />
) (#18513, #28124 by @bvaughn and @eps1lon)scale
style property (#25601 by @JonnyBurger)onChange
error message for controlled<select>
(#27740 by @Biki-das)render
,hydrate
,findDOMNode
,unmountComponentAtNode
,unstable_createEventHandle
,unstable_renderSubtreeIntoContainer
, andunstable_runWithPriority
. MovecreateRoot
andhydrateRoot
toreact-dom/client
. (#28271 by @gnoff)test-utils
(#28541 by @eps1lon)unstable_flushControlled
(#26397 by @kassens)renderToStaticNodeStream()
(#28873 by @gnoff)unstable_renderSubtreeIntoContainer
(#29771 by @kassens)React DOM Server
bootstrapScripts
andbootstrapModules
(#25104 by @gnoff)bootstrapModules
,bootstrapScripts
, and update priority queue (#26754, #26753, #27190, #27189 by @gnoff)onHeaders
entrypoint option (#27641, #27712 by @gnoff)<style>
and<script>
textContent to enable rendering inner content without dangerouslySetInnerHTML (#28870, #28871 by @gnoff)srcset
to trigger load event on mount (#30351 by @gnoff)onError
(#27761, #27850 by @gnoff and @sebmarkbage)crossorigin
support to bootstrap scripts (#26844 by @HenriqueLimas)nonce
andfetchpriority
in preload links (#26826 by @liuyenwei)referrerPolicy
toReactDOM.preload()
(#27096 by @styfle)react/jsx-dev-runtime
(#28921 by @himself65)errorInfo.digest
fromonRecoverableError
(#28222 by @gnoff)ReactTestRenderer
react-test-renderer
on web (#27903, #28904 by @jackpope and @acdlite)react-test-renderer/shallow
export (#25475, #28497 by @sebmarkbage and @jackpope)React Reconciler
prepareUpdate
(#26583, #27409 by @sebmarkbage and @sophiebits)React-Is
isConcurrentMode
andisAsyncMode
methods (#28224 by @gaearon)useSyncExternalStore
v18.3.1
Compare Source
act
fromreact
f1338fv18.3.0
Compare Source
This release is identical to 18.2 but adds warnings for deprecated APIs and other changes that are needed for React 19.
Read the React 19 Upgrade Guide for more info.
React
this.refs
to support string ref codemod 909071findDOMNode
outside StrictMode c3b283test-utils
methods d4ea75defaultProps
for function components #25699key
#25697act
fromtest-utils
d4ea75React DOM
unmountComponentAtNode
8a015brenderToStaticNodeStream
#28874v18.2.0
Compare Source
React DOM
onRecoverableError
. (@gnoff in #24591)document
causing a blank page on mismatch. (@gnoff in #24523)setState
in Safari when adding an iframe. (@gaearon in #24459)React DOM Server
<title>
elements to match the browser constraints. (@gnoff in #24679)highWaterMark
to0
. (@jplhomer in #24641)Server Components (Experimental)
useId()
inside Server Components. (@gnoff in #24172)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Renovate Bot.
f3b9a14178
to453130b24b
fix(deps): update react monorepo to v18.2.0to chore(deps): update react monorepo453130b24b
to1ccd18c1b7
1ccd18c1b7
toc78c854f4d
c78c854f4d
to2e949e2158
2e949e2158
to4db17c1a6c
4db17c1a6c
toaeb4c3deee
aeb4c3deee
to6d76744f8c
6d76744f8c
tobe41175373
be41175373
toe466eaa43b
e466eaa43b
to4b8e7bf04a
4b8e7bf04a
toab5df4c585
ab5df4c585
to1495aa6077
1495aa6077
to5612937e9f
5612937e9f
to03510487d7
03510487d7
to7f6a0861d2
7f6a0861d2
to8095eb66c0
8095eb66c0
to4b6da776bf
4b6da776bf
to1bd55323f4
1bd55323f4
tofbf10ea0a6
fbf10ea0a6
to460f955291
460f955291
to0202c079ee
0202c079ee
to60384e8f72
60384e8f72
tob9caf9e1d1
b9caf9e1d1
to50a84417ca
50a84417ca
to4e0e982574
4e0e982574
to12fff12dfc
12fff12dfc
to672cc5d871
672cc5d871
to2cea98ca55
2cea98ca55
toc0b19e9bae
c0b19e9bae
to19851aaa63
19851aaa63
to96f8d3df72
96f8d3df72
to9599858555
9599858555
to1c869d5af2
1c869d5af2
toca1b809e5e
ca1b809e5e
tocb23d37fe8
cb23d37fe8
to6c019d0c97
6c019d0c97
to37bc59749e
37bc59749e
to1dabc51074
1dabc51074
to96f836067d
96f836067d
to0412014943
0412014943
to282d50cb24
282d50cb24
to79481c44bc
79481c44bc
to1436fc18f4
1436fc18f4
toee05e38121
ee05e38121
to51bc804895
51bc804895
to571c66336d
571c66336d
tocfbde71859
cfbde71859
to867a907dba
867a907dba
to717c9720a3
717c9720a3
to4e8d02ae18
4e8d02ae18
tof932be48c9
f932be48c9
toad171d35f8
ad171d35f8
toe3a3d27dbb
e3a3d27dbb
to6ed8d958fe
6ed8d958fe
todf74836d0c
df74836d0c
to9c615738d2
9c615738d2
tob770330d8d
b770330d8d
to7ca716a779
7ca716a779
tof0bc26388b
f0bc26388b
to780276ff34
780276ff34
to864e14237d
864e14237d
toab6f35bebb
ab6f35bebb
tocde03de7a5
cde03de7a5
to596fb7fc3e
596fb7fc3e
tof5b5c143d8
f5b5c143d8
toc0daa5522a
c0daa5522a
toa3f02e277a
a3f02e277a
to73a2d9d88d
73a2d9d88d
toe37c7802ed
e37c7802ed
to7b7b6ddb44
7b7b6ddb44
to13dede4707
13dede4707
to39714b2656
39714b2656
toa906e02ae1
a906e02ae1
toc26690712b
c26690712b
toc1ff961903
c1ff961903
tode5ca13223
de5ca13223
toa5d271c38e
a5d271c38e
to218df3f744
218df3f744
tob7495b54ae
b7495b54ae
to2622aaa117
2622aaa117
to2d8b7512f3
2d8b7512f3
tod327351572
d327351572
to0f44cf67f0
0f44cf67f0
tod853c118d2
d853c118d2
to2b9d7b924f
2b9d7b924f
to70161eeddd
70161eeddd
to16d524bd37
16d524bd37
to5ab0a510bd
5ab0a510bd
tof95f535900
f95f535900
to7472c5dca4
7472c5dca4
toaf54d73214
af54d73214
to37105b3495
37105b3495
to9d577c349e
9d577c349e
to0ca4a923db
0ca4a923db
to57634ddd1e
57634ddd1e
to8821f75fdc
8821f75fdc
tof40d1f0d74
f40d1f0d74
tof265596ada
f265596ada
to5ecbfa1cc5
5ecbfa1cc5
to81eca31fe0
81eca31fe0
tof8a58b26e7
f8a58b26e7
to9c24bb61c5
9c24bb61c5
toe0c58612f7
e0c58612f7
to5051cc2264
5051cc2264
tof2dc5e2514
f2dc5e2514
toc22a2343a3
c22a2343a3
to3541af980d
3541af980d
to97d5b27509
chore(deps): update react monorepoto chore(deps): update react monorepo to v18.3.097d5b27509
tof695250b17
chore(deps): update react monorepo to v18.3.0to chore(deps): update react monorepof695250b17
to142600601c
142600601c
toceec462c8e
ceec462c8e
to8d41518c69
8d41518c69
to18d7c51180
18d7c51180
to957ea166ef
957ea166ef
tod53d066806
d53d066806
toa754f5cc46
a754f5cc46
to0985a3078e
0985a3078e
to397dc33392
397dc33392
tob015f1cd33
b015f1cd33
toc83394a430
c83394a430
tof339282102
f339282102
toe2fed58049
e2fed58049
to69d075b154
69d075b154
to2bbf86a650
chore(deps): update react monorepoto chore(deps): update react monorepo to v192bbf86a650
to7c231eac3f
7c231eac3f
to036bd31c27
036bd31c27
to79c2e1dbc6
79c2e1dbc6
to84b03bc960
84b03bc960
toa6ccd85c31
Checkout
From your project repository, check out a new branch and test the changes.