【分享创造】react-typewriter-hook: 用react hooks来实现打字机的效果
文章目录
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
}

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论