I want to create an app on React where a user can input a number of his bank card. In the input field will be a default value with 16 zeros and every next zero will immediately change to the inputed number.
import React, { useState } from 'react'
function CardNumber() {
const [value, setValue] = useState('')
const changeState = event => {
setValue(event.target.value)
}
return (
<input
value={value}
onChange={changeState}
placeholder='0000 0000 0000 0000'/>
)
}
export default CardNumber
New contributor
Нікіта Гончарук is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.