Nothing is looping with useTypewriter hook #119783
Unanswered
Yazan-Egbaria
asked this question in
Programming Help
Replies: 2 comments
-
Try this: import React from "react"; const Header = () => { return ( <Headercontent className="text-container" span="Heya!" header={ <> I am {text} <span style={{ color: "#C9DA2D" }}> </> } /> ); }; export default Header; |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ohh !! Simple all you need to do is change {text} to [text] import "./Header.css";
import Headercontent from "../../components/Headercontent/Headercontent";
import { useTypewriter, Cursor } from "react-simple-typewriter";
const Header = () => {
const [ text ] = useTypewriter({
words: ["Developer", "Designer", "Yazan"],
loop: true,
typeSpeed: 80,
deleteSpeed: 80,
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Body
Hey,
So this is the component js
Why is nothing looping? even nothing is rendering, and when i log text it says undefined? though the react simple typewriter is installed
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions