Hi all. I am
T.Hocine
> Front-e
// find my profile on Github
const githubLink = https://github.com/TegHocine
const email = t.hocine.dev@gmail.com
case 'deleting':
const nextTodelete = whatToType.slice(0, typed.length - 1)
if (nextTodelete === '') {
setphase('typing')
return
}
const deletingTime = setTimeout(() => {
setTyped(nextTodelete)
}, DELETING_INTERVAL)
return () => clearTimeout(deletingTime)
case 'typing':
const nextToType = whatToType.slice(0, typed.length + 1)
if (nextToType === typed) {
setphase('pause')
return
}
const typingTime = setTimeout(() => {
setTyped(nextToType)
}, TYPING_INTERVAL)
return () => clearTimeout(typingTime)
case 'deleting':
const nextTodelete = whatToType.slice(0, typed.length - 1)
if (nextTodelete === '') {
setphase('typing')
return
}
const deletingTime = setTimeout(() => {
setTyped(nextTodelete)
}, DELETING_INTERVAL)
return () => clearTimeout(deletingTime)