Skip to content

Commit cb503a1

Browse files
committed
docs: update readme
1 parent e2843fa commit cb503a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ import { useTypewriter} from 'react-simple-typewriter'
144144

145145
const MyComponent = () => {
146146

147-
const {text} = useTypewriter({
147+
const [text] = useTypewriter({
148148
words: ['Hello', 'From', 'Typewriter', 'Hook!'],
149149
loop: {0}, // Infinit
150150
})
@@ -167,7 +167,7 @@ import { useTypewriter, Cursor} from 'react-simple-typewriter'
167167

168168
const MyComponent = () => {
169169

170-
const {text} = useTypewriter({
170+
const [text] = useTypewriter({
171171
words: ['Hello', 'From', 'Typewriter', 'Hook!'],
172172
loop: {3},
173173
onLoopDone: () => console.log(`loop completed after 3 runs.`),

0 commit comments

Comments
 (0)