Skip to content

Change the name of StripeButton in the example #9

Description

@dcaravana

Just a little advice: change that name to something like ReactStripeButton because checkout.js defines StripeButton, too, so when you build the React objects the first time all is fine (because stripe's script is loaded asynchronously), then if something happens that require to access again to the React object StripeButton was pointing to (like a setState() call), React throws exception (Uncaught TypeError: type.toUpperCase is not a function).

Really a little nasty bug, it took my hours to figure out and fix it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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