braposo / react-text-loop

Animate words in your headings

Home Page:https://codesandbox.io/s/react-text-loop-playground-br4q1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't work it with react

nazmul162001 opened this issue · comments

### I try to use it this way in my react application. But it doesn't work. Please help anyone. It is so essential for me.

import TextLoop from "react-text-loop";

 <div>
           <TextLoop interval={100} springConfig={{ stiffness: 180, damping: 8 }}>
                        <span>Text1</span>
                        <span>Text2</span>
                        <span>Text3</span>
            </TextLoop>
  </div>

@nazmul162001 what version of react are you using? This component hasn't been updated in years, so you're likely just using a newer version of react.

You might have an issue with React version. It doesn't work with 18

This might help @joeyfigaro

This library provides same utility but works for React 18.

https://github.com/WinterCore/react-text-transition