If state is changing on onClick function..than how can we test that?
const [disabled, setDisabled] = useState(true)
const addDomain = () => {
console.log("In function")
setDomains([...domains, domain.trim()])
setDisabled(false)
}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If state is changing on onClick function..than how can we test that?
const [disabled, setDisabled] = useState(true)
const addDomain = () => {
console.log("In function")
setDomains([...domains, domain.trim()])
setDisabled(false)
}