Skip to content

Support React 18 #74

@tbantle22

Description

@tbantle22

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions