MCPcopy Index your code
hub / github.com/braposo/react-text-loop / constructor

Method constructor

src/components/TextLoop.tsx:55–68  ·  view source on GitHub ↗
(props: Props)

Source from the content-addressed store, hash-verified

53 };
54
55 constructor(props: Props) {
56 super(props);
57 const elements = React.Children.toArray(props.children);
58
59 this.state = {
60 elements,
61 currentEl: elements[0],
62 currentWordIndex: 0,
63 wordCount: 0,
64 currentInterval: Array.isArray(props.interval)
65 ? props.interval[0]
66 : props.interval,
67 };
68 }
69
70 componentDidMount(): void {
71 // Starts animation

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected