You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is rendered in Modal, now the problem is when i close the modal and open another, there's 2 instance one running in display and the previous one that is running in background waiting to finish typing.
<Typewriteroptions={{delay: 50,loop: false}}onInit={typewriter=>{typewriter.typeString(newMessage).pauseFor(1000).callFunction(()=>{// this is called when newMessage completes typingif(trackId){setShow(true);}}).start();}}/>
what i want to do is call a stop or restart of event so it won't reach the callFunction on the previous one that is running in background.
once handleCloseModal is called it should restart and only one Typewriter should start
consthandleCloseModal=()=>{Typewriter.restart()};
is this possible? and how can i achieve this using react?
The text was updated successfully, but these errors were encountered:
This is rendered in Modal, now the problem is when i close the modal and open another, there's 2 instance one running in display and the previous one that is running in background waiting to finish typing.
what i want to do is call a stop or restart of event so it won't reach the callFunction on the previous one that is running in background.
once handleCloseModal is called it should restart and only one Typewriter should start
is this possible? and how can i achieve this using react?
The text was updated successfully, but these errors were encountered: