react-native-credit-card-input icon indicating copy to clipboard operation
react-native-credit-card-input copied to clipboard

how to set onChange func?

Open Talkwondo opened this issue 7 years ago • 1 comments
trafficstars

Hi, I probably missed something. can someone explain how to handle on change prop? If i want to extract the number and the other fields to state object.

Thanks,

Talkwondo avatar Aug 10 '18 12:08 Talkwondo

this should be a stackoverflow question, not a ticket, but i'll answer for help:

// inside render
<CreditCardInput onChange={this._onCreditCardChanged} />

// outside render(){...}
private _onCreditCardChanged = (result) => {
        console.log(result);
    };

look at the log when running app.

kuriel-dev avatar Oct 16 '18 18:10 kuriel-dev