react-fittext
react-fittext copied to clipboard
Accept PR of refactor to TypeScript + Hooks?
For the concern of compatibility, I refactored the code of this package to the fashion of TypeScript + Hooks and removed prop-types, but the API is identical, with some bugfixes, wondering if you would receive this as a pull request, or I have to publish another package.
Hey, thanks for this!
I’d be open to it, but I also don’t mind if you decide to publish another package. If you decide to publish your own package ex. @losses/react-fittext as a TypeScript version, I’d be happy to link to that in the README.
I would want to keep the PropTypes, but otherwise am open to those changes. I’m not really using Hooks much personally, but this component is so minimal I don’t mind.
The most notably absent feature from this component is probably described in https://github.com/kennethormandy/react-fittext/issues/4#issuecomment-526401781 so either way, that is a change I’d like to make. That might not factor into your plans either way.
The TypeScript piece—my understanding is that it wouldn’t have any impact for regular JS users, because the toolchain would be there to compile the output, but it would improve things for developers using TypeScript like you. Is that correct?
The TypeScript piece—my understanding is that it wouldn’t have any impact for regular JS users, because the toolchain would be there to compile the output, but it would improve things for developers using TypeScript like you. Is that correct?
Yes, you're right. I'll try to find a way to keep PropTypes
I would love to see TypeScript support for this library. Any updates on this?