-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
I have the array of facts and every time the typing is done i want new fact, how to achieve that?
const pickRandomString = () => {
let random = Math.floor(Math.random() * facts.length);
console.log(facts[random])
return [facts[random]];
}
const [text, flags] = useTypewriter({
words: pickRandomString(),
loop: false,
typeSpeed: 50,
deleteSpeed: 40,
//onLoopDone: () => console.log("done from typewriter hook")
});
Metadata
Metadata
Assignees
Labels
No labels