react-typewriter-hook
⌨️ 使用react hooks來輕鬆實現打字機的效果
安裝
npm i react-typewriter-hook --save
例子
View example at codesandbox
使用
// useTypewriter will do these things
// Once Word changed, typewritter will automatically erase last word
// Then type down new word
import useTypewriter from "react-typewriter-hook"
function MagicWriter(word) {
const typing = useTypewriter(word)
return typing
}