malte-wessel / react-textfit

React component to fit headlines and paragraphs into elements
http://malte-wessel.github.io/react-textfit/
MIT License
469 stars 143 forks source link

Textfit deprecated? #69

Open seungchulee opened 3 years ago

seungchulee commented 3 years ago

when import Textfit it shows deprecated message please let me know how to fix this :sob:

Screen Shot 2021-01-08 at 7 47 27 PM Screen Shot 2021-01-08 at 7 49 13 PM
iway1 commented 3 years ago

Why was this closed? I'm having the same issue

seungchulee commented 3 years ago

Why was this closed? I'm having the same issue

I reopend this issue!

alekmieczkowski commented 3 years ago

Any update on this?

alpturedi commented 3 years ago

I tried many fixes that I think related to this issue but with no luck, so I removed the library but couldn't find a good one to replace it so I hope we'll find a fix for this.

Berdugo1994 commented 3 years ago

does someone heard any update ?

alekmieczkowski commented 3 years ago

@alpturedi could you describe what fixes you have tried? This library has been a huge help in some of the projects I have built, so I would like to give the deprecation issue a shot. I just don't want to waste times on avenues you've already explored. Thanks in advance

alpturedi commented 3 years ago

Second part of the error I'm getting is this. I thought they were related and tried to fix this one. Do you think they are related?

Could not find a declaration file for module 'react-textfit'. 'node_modules/react-textfit/lib/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/react-textfit` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-textfit';`ts(7016)

Screen Shot 2021-02-23 at 18 07 26

amamenko commented 3 years ago

You can also import Textfit like so:

import Textfit from "react-textfit/lib/Textfit";

bhenning83 commented 3 years ago

I'm having the same issue. I tried import Textfit from "react-textfit/lib/Textfit"; as well.