roto93 / react-native-neat-date-picker

An easy to use date picker for react native.
MIT License
50 stars 29 forks source link

typescript support #18

Closed diecodev closed 1 year ago

diecodev commented 1 year ago

What I do:

I went to the trouble of add typescript support:

Ps. I have an idea to make it so that anyone who wants to make contributions to the project can do so without creating a react-native/expo project and then installing the npm package from this repo, but I have to do the necessary research first to see if it will work.

To do:

Ps-II. I did the testing on my cell phone using expo and there were no bugs, however, I invite anyone to test this branch (if you are interested in Typescript support) in order to find future bugs.

--STEPS TO PUBLISH THE NEW PACKAGE--

  1. git pull origin main (in case you merge the branch, otherwise clone my branch).
  2. npm install --save.
  3. npx tsc (in case you have typescript installed as a global deps, use just tsc).
  4. then, you can tun the npm update command in terminal/bash.

Sorry for add contributors tag in package json (in case you are disagree). 💙

roto93 commented 1 year ago

Hi, thank you very much for this typescript support😄. I'm trying to understand what you have done these days but it seems that I don't have adequate knowledge about typescript.

So I think what I'm going to do is just make sure this package can run in RN/Expo projects. Then I'll accept this PR.

Just one thing. Do you think it is a good idea to merge this PR to main and update the original package, or it's better to publish a NEW package something like react-native-neat-date-picker-ts?

diecodev commented 1 year ago

Hi, roto. Sorry for the late response.

I agree with whatever you decide. But to be honest I think is better (if you are agree, of course) if you made me a moderator or collab to help you with some issues and anything else. I notice about your actual situation (militar situation) and I think that I can help you with issues and making you some PR's just for make the component such better.

roto93 commented 1 year ago

That would be great! It's very happy to know that you are willing to collaborate this component. I will send you a collaborater invitation. Thank you.

diecodev commented 1 year ago

It's very nice to know you are agree with my request. In 2 weeks I am going to make one other PR with the custom hook I mentined and I going to work in the readme file to update docs (in the typescript branch).

Btw, what do you decide? A create new package or just update this one?

roto93 commented 1 year ago

I decide to update this one. That way both JS and TS users can use it, and only one package needs to be maintained.

diecodev commented 1 year ago

Oh, that's great. I've been bussy for a little bit, but now I got time to work in some updates. I'm going to wait for the merge to work on it. Blessings.

roto93 commented 1 year ago

I've done the test of this PR. time to merge it. I should have done this earlier😅 I think I will publish a new version for now and you can working on further works you've mentioned. Thanks a lot!