Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept PR of refactor to TypeScript + Hooks? #5

Open
Losses opened this issue Jun 12, 2020 · 3 comments
Open

Accept PR of refactor to TypeScript + Hooks? #5

Losses opened this issue Jun 12, 2020 · 3 comments

Comments

@Losses
Copy link

Losses commented Jun 12, 2020

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.

@kennethormandy
Copy link
Owner

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 #4 (comment) 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?

@Losses
Copy link
Author

Losses commented Jun 14, 2020

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

@hoonsubin
Copy link

hoonsubin commented Jul 8, 2020

I would love to see TypeScript support for this library. Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants