revolunet / react-mailchimp-subscribe

React subscribe form for Mailchimp.
https://revolunet.github.io/react-mailchimp-subscribe/
244 stars 49 forks source link

Support React 18 #74

Open tbantle22 opened 2 years ago

tbantle22 commented 2 years ago

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.
BearCooder commented 2 years ago

yes not working for me either

BearCooder commented 1 year ago

any chance for an update? :) @revolunet

revolunet commented 1 year ago

Hi, i could merge a PR if you can fix it, thanks