@jan25/react-typing-hook
v0.1.2
Published
Simple React hook to manage state for auto typing text
Downloads
9
Maintainers
Readme
react-typing-hook
Simple React Hook to manage state for auto typing text.
Sample Usage
npm i --save @jan25/react-typing-hook
import useAutoType from '@jan25/react-typing-hook';
export default function App() {
const [text, setText] = useState(randomText())
const currentText = useAutoType(text)
return (
<div>
<div className="App" style={{textAlign: "center"}}>
<button onClick={() => setText(randomText())}>Another text</button>
{ currentText }
</div>
</div>
);
}
See example
app in the Github repository.