#gsd_reactnative-country
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1273767410310320140
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
gsd_reactnative-country
@digital arrow bear with me I absolutely do not understand React Native as a stack and almost know nothing about it
Can you explain a bit more details about the issue? What does selectCountry in your code mean? What are you really trying to do in the UI? Can you share a screenshot of what you see as there are many ways to integrate our SDK
selectCountry is to set a string of 'CA or US through useState.
const [countryCode, setCountryCode] = useState('US');
const selectCountry = (value: string): void => {
setCountryCode(value);
};
when entering card info I want to pass that string to the countryCode Prop on the CardField as I want to make sure that the postal code input in the CardField Component switches from numeric input to alphanumeric input based on the country.
Okay so if you hardcode CA it works fine, it's only when the UI is already rendered and you are trying to dynamically change/update that country?
Yes, exactly.
Gotcha. Unfortunately this is likely a limitation of the SDK and we don't support you changing that value.
If I were you I'd switch to our "payment element" UI instead that is more advanced and includes a country dropdown already. See https://docs.stripe.com/payments/accept-a-payment?platform=react-native
But otherwise you'll have to write in to support https://support.stripe.com/contact as no one on my team is online right now with React Native experience that you could pair with I'm sorry