#gsd_reactnative-country

1 messages ¡ Page 1 of 1 (latest)

cerulean ironBOT
#

👋 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.

tacit berry
#

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

digital arrow
#

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.

tacit berry
#

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?

digital arrow
#

Yes, exactly.

tacit berry