typewriterjs
typewriterjs copied to clipboard
Callback runs twice with NextJS?
Didn't see this question asked elsewhere. It appears that the callFunction
runs twice.
<Typewriter
onInit={(typewriter) => {
typewriter.typeString("Welcome to Dev Diaries...")
.pauseFor(1000)
.deleteAll()
typewriter.typeString("The podcast for developers and technical founders.")
.pauseFor(1500)
.deleteAll()
typewriter.typeString("Launching January 2023. Join us..")
.pauseFor(1500)
.callFunction(() => {
console.log('finished typewriter text...')
})
.start();
}}
/>
The above code results in the console log spitting out the text twice. I've also tried creating a function and calling it within the .callFunction
which also results in it being run twice. Thoughts? Thanks in advance. Great library.
I also have this issue. Did you find a fix?
Unfortunately I have not. It's a strange one.