malte-wessel/react-textfit

Textfit deprecated?

Opened this issue · 9 comments

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

Screen Shot 2021-01-08 at 7 47 27 PM

Screen Shot 2021-01-08 at 7 49 13 PM

iway1 commented

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

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

I reopend this issue!

Any update on this?

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.

does someone heard any update ?

@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

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

You can also import Textfit like so:

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

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