Trying to set up a form that takes a customer's address and phone number, but the API only accepts the phone number with the country code attached. So I need to add it in through the code.
I've tried it with my code below, but it seems like it's always leaving out the last number.
export default function ShippingAddressForm(props: Props) { let { address, onChangeAddress } = props; let [phoneState, setPhoneState] = useState<string>('');<TextInput label={t('Phone Number')} textContentType="telephoneNumber" value={phoneState} onChangeText={(number) => { setPhoneState(number) let phone = '+61'+ phoneState onChangeAddress({ ...address, phone }) }} />}
Building an app on Expo with react native typescript