#CharlieAIO-react-address-element
1 messages · Page 1 of 1 (latest)
It sounds like this script isn't running until after the page renders. Does that sound about right?
yeah basically. Ive tried using the onReady prop but either that doesn't work or I'm not using it correctly
What do you need to set the defaultValue for? That only gets set on the initial load of the form, so doing an asynchronous reload of the page is the only way to change that.
So the customer can view their current billing information and make any amendments as necessary
https://pastebin.com/79t6ZkfU here is the full code if it helps at all
Taking a look. Will circle back in a few
Hmmm, do you have this running somewhere I can view it? In other words, do you have a URL I can use to see it in action?
👋 stepping in
Catching up one moment
Can you add a log to your onChange before you call setName and setAddress and log out the event there @vapid minnow ?
Then let's test what happens when you do actually complete the address and see what it logs
Hmm wait yeah I'm confused. Let's back up.
You are attempting to set the initial state of address and name based on the last state of address and name
So on the initial load this is always going to be null
If you want the customer to view their current billing information, then you likely want to be passing a prop to your Billing component that contains your stored address/name for that customer that you would retrieve when you authenticate them
CharlieAIO-react-address-element