Once upgrading our app to react and @types/react v18, we got this error on compile:
% yarn compile
src/components/MailingList/index.tsx:29:8 - error TS2786: 'MailchimpSubscribe' cannot be used as a JSX component.
Its instance type 'MailchimpSubscribe<EmailFormFields>' is not a valid JSX element.
The types returned by 'render()' are incompatible between these types.
Type 'import("<path>/web/node_modules/@types/react-mailchimp-subscribe/node_modules/@types/react/index").ReactNode' is not assignable to type 'React.ReactNode'.
Type '{}' is not assignable to type 'ReactNode'.
29 <MailchimpSubscribe
~~~~~~~~~~~~~~~~~~
Found 1 error.
Once upgrading our app to
react
and@types/react
v18, we got this error on compile: