braposo / react-text-loop

Animate words in your headings
https://codesandbox.io/s/react-text-loop-playground-br4q1
MIT License
878 stars 65 forks source link

Can't work it with react #86

Open nazmul162001 opened 1 year ago

nazmul162001 commented 1 year ago

### 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>
joeyfigaro commented 1 year ago

@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.

josephgoksu commented 1 year ago

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

This might help @joeyfigaro

JonathanSouthern commented 1 year ago

This library provides same utility but works for React 18.

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