Skip to content
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

TS issue with 0.2.3 StripeProvider cannot be used as a JSX component #658

Merged
merged 2 commits into from
Oct 19, 2021

Conversation

littleski
Copy link
Contributor

With 0.2.3 i have a TS break.

StripeProvider' cannot be used as a JSX component.
  Its return type 'ReactElement<any, string | JSXElementConstructor<any>> | ReactElement<any, string | JSXElementConstructor<any>>[]' is not a valid JSX element.
    Type 'ReactElement<any, string | JSXElementConstructor<any>>[]' is missing the following properties from type 'ReactElement<any, any>': type, props, key

This is due of the typing of children. The easiest way is to force with fragments to ensure this is a proper JSX component.

…nent.

With 0.2.3 i have a TS break.

StripeProvider' cannot be used as a JSX component.
  Its return type 'ReactElement<any, string | JSXElementConstructor<any>> | ReactElement<any, string | JSXElementConstructor<any>>[]' is not a valid JSX element.
    Type 'ReactElement<any, string | JSXElementConstructor<any>>[]' is missing the following properties from type 'ReactElement<any, any>': type, props, key

This is due of the typing of children. The easiest way is to force with fragments to ensure this is a proper JSX component.
@CLAassistant
Copy link

CLAassistant commented Oct 19, 2021

CLA assistant check
All committers have signed the CLA.

@acomley-stripe acomley-stripe self-assigned this Oct 19, 2021
@trigonometric-act
Copy link

Still the problem?

@iM-GeeKy
Copy link

iM-GeeKy commented Dec 20, 2021

TS error: 'StripeProvider' cannot be used as a JSX component #678

It appears the fix has been merged, but will be made available in the next release. You can apply the temporary patch as described here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants