Open Jules003 opened 1 year ago
Same issue here :(
hello there below is attached the typewriter component for my react app and the issue i am having is that the deleteSpeed prop is not working as expected. I tried integrating the changeDeleteSpeed() method however the same issue still persists. the delay prop works fine.
<Typewriter onInit={(typewriter) => { typewriter .typeString("sentence 1") .pauseFor(1500) .deleteAll() .typeString(" sentence 2") .pauseFor(3000) .deleteAll() .callFunction(() => { $("#scroll-wrapper").addClass("show-up"); props.addSections.addSections(true); }) .typeString("Scroll down to learn more :)") .pauseFor(1500) .deleteAll() .callFunction(() => { setIsReadyToUnmount(true); }) .start(); }} options={{ delay: 45, deleteSpeed: 10, }} />
I just found a way !
<Typewriter
onInit={(typewriter) => {
typewriter
.pauseFor(3000)
.typeString(`ExampleString`)
.pauseFor(1000)
.deleteAll(10)
.typeString(`ExampleString`)
.pauseFor(1000)
.deleteAll(10)
.start()
}}
options={{
autoStart: true,
loop: true,
delay: 50,
}}
/>
You have to manually put the speed of the deleting on the deleteAll() function. I managed it that way and is working so far.
.deleteAll(speed)
It looks like the deleteSpeed is only applied for the .deleteChars() function.
hello there below is attached the typewriter component for my react app and the issue i am having is that the deleteSpeed prop is not working as expected. I tried integrating the changeDeleteSpeed() method however the same issue still persists. the delay prop works fine.
<Typewriter onInit={(typewriter) => { typewriter .typeString("sentence 1") .pauseFor(1500) .deleteAll() .typeString(" sentence 2") .pauseFor(3000) .deleteAll() .callFunction(() => { $("#scroll-wrapper").addClass("show-up"); props.addSections.addSections(true); }) .typeString("Scroll down to learn more :)") .pauseFor(1500) .deleteAll() .callFunction(() => { setIsReadyToUnmount(true); }) .start(); }} options={{ delay: 45, deleteSpeed: 10, }} />