From 6a287cd0534cdf2670ff378f37aa332313215ce7 Mon Sep 17 00:00:00 2001 From: patrykboch Date: Thu, 2 Jun 2022 22:13:18 +0200 Subject: [PATCH 1/2] Add react 18.1.0 to peer deps --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f650a688..e09a2da1 100644 --- a/package.json +++ b/package.json @@ -54,8 +54,8 @@ }, "peerDependencies": { "prop-types": "^15.5.7", - "react": "^16.3.0 || ^17.0.0", - "react-dom": "^16.3.0 || ^17.0.0" + "react": "^16.3.0 || ^17.0.0 || ^18.1.0", + "react-dom": "^16.3.0 || ^17.0.0 || ^18.1.0" }, "devDependencies": { "@babel/core": "^7.2.2", From f28d4ac3e508097fa2d5f3fb12594e10e72c5df7 Mon Sep 17 00:00:00 2001 From: patrykboch Date: Fri, 10 Jun 2022 13:16:23 +0200 Subject: [PATCH 2/2] Types: change `React.SFC` and `React.ComponentClass` with `React.ComponentType` * `React.SFC` type is no longer supported with React v. 18 (becomes `React.FC`) * Since `React.ComponentClass` was specified the proper type now is `React.ComponentType` that covers both `React.FC` and `React.ComponentClass` --- types/index.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index 770a7717..620311ee 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -104,8 +104,7 @@ export interface Config { export type WrappedComponentFactory

= (props: P) => JSX.Element; export type WrappedComponent

= - | React.ComponentClass

- | React.SFC

+ | React.ComponentType

| WrappedComponentFactory

; export function SortableContainer

(