-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "chore(deps-dev): bump @types/react from 18.0.21 to 18.0.25 (#… #1831
Revert "chore(deps-dev): bump @types/react from 18.0.21 to 18.0.25 (#… #1831
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Codecov Report
@@ Coverage Diff @@
## main #1831 +/- ##
=======================================
Coverage 91.20% 91.20%
=======================================
Files 170 170
Lines 3662 3662
Branches 1220 1220
=======================================
Hits 3340 3340
Misses 303 303
Partials 19 19 |
Update: I noticed that the This wasn't done for the |
A short-term fix for the issue is to extend the namespace of the React 17 types in apps using Circuit UI: import { ReactEventHandler } from 'react';
declare global {
namespace React {
interface DOMAttributes<T> {
onResize?: ReactEventHandler<T> | undefined;
onResizeCapture?: ReactEventHandler<T> | undefined;
}
}
} Downsides here:
Let's see if anything better comes out of the conversation over at DefinitelyTyped. But even if nothing does, it feels like downgrading types isn't the solution here, hence, closing this PR. |
This solves TS issues with nonce. See #1831
* Update sumup packages * Upgrade React and React types This solves TS issues with nonce. See #1831 * Remove noMargin from template * Fix docs ref
This reverts commit 0650528.
Purpose
This version bump caused compatibility issues with web apps using Circuit on React 17.
It looks like the underlying HTML element types for components (such as
HTMLAttributes<HTMLParagraphElement>
forBody
) is incompatible between React 17 and 18 types:The error messages point to two recent changes in the React 18 types:
nonce
to global attributes DefinitelyTyped/DefinitelyTyped#62879onResize
event to video elements DefinitelyTyped/DefinitelyTyped#63076Approach and changes
Before downgrading I tried:
Definition of done