maxeth / react-type-animation

A React typewriter animation based on typical with extended functionality and customization.
https://react-type-animation.netlify.app/
MIT License
353 stars 25 forks source link

How i know that the animation of typing ended ? #51

Closed meddhiaka closed 4 months ago

meddhiaka commented 4 months ago

for example when the text is rendering till the end, how i know that the text is rendered ?

maxeth commented 4 months ago

You can track the typing state via callback functions

If you repeat the animation X times, you can implement a counter via React state that gets incremented at the end of a sequence to know when the animation finishes its last repetition. See here: https://github.com/maxeth/react-type-animation/issues/23#issuecomment-1529579314