Skip to content

Commit 846b00c

Browse files
committed
was so proud to know that spread can be used to split a string into characters, but linting tells me to use split ;)
1 parent e997d89 commit 846b00c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/animated/Typing.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const Button: React.FC<IProps> = ({ children, colorChange, randomize }) => {
8585

8686
const type = useCallback(() => {
8787
const part = parts[partIndexRef.current]
88-
const charactersArray = [...part]
88+
const charactersArray = part.split('')
8989
const character = charactersArray[characterIndexRef.current]
9090
// set a new color
9191
if (withColorChange && characterIndexRef.current === 0) {

0 commit comments

Comments
 (0)