GithubHelp home page GithubHelp logo

Comments (5)

glaucopater avatar glaucopater commented on June 16, 2024 1

Hi @adambarghouthi, I found the same issue and also this thread with a "strong" workaround. Basically it forces to reload the component changing the key
#225

from react-stripe-elements.

davedbase avatar davedbase commented on June 16, 2024

I'm having a similar issue. This is how I'm invoking Elements:

<Elements key={language} locale={language} stripe={stripePromise}>

If I pass fr into locale the field it doesn't do anything. Furthermore my linter goes crazy because locale is apparently not set on ElementProps (supposedly).

Every other sample with Stripe.js works except for the hooks versions. I'm using it correctly given the documentation: https://github.com/stripe/react-stripe-elements#elements. I'm also on the latest version of the dpeendency.

from react-stripe-elements.

adambarghouthi avatar adambarghouthi commented on June 16, 2024

@davedbase have you tried what @glaucopater suggested? A strong reset of the component using a key prop that changes with the locale should work (I haven't tried it yet but I've seen it used in other instances)

from react-stripe-elements.

davedbase avatar davedbase commented on June 16, 2024

@adambarghouthi I created a topic here: #554 which shows the exact method I'm using. I'm basically giving it a key when it first mounts but there's more details in my specific issue that might be useful.

from react-stripe-elements.

adambarghouthi avatar adambarghouthi commented on June 16, 2024

it's in the options prop! thanks @davedbase

from react-stripe-elements.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.