mlynch / nextjs-tailwind-ionic-capacitor-starter

A starting point for building an iOS, Android, and Progressive Web App with Tailwind CSS, React w/ Next.js, Ionic Framework, and Capacitor
https://dev.to/ionic/build-mobile-apps-with-tailwind-css-next-js-ionic-framework-and-capacitor-3kij
MIT License
1.69k stars 341 forks source link

Typescript > JavaScript #39

Closed amunrarara closed 7 months ago

amunrarara commented 1 year ago

Cheers! I performed a gentle-enough refactor to turn this awesome project into a Typescript project, in case that's interesting for anyone.

Awesome work, @mlynch !

amunrarara commented 1 year ago

Ah, one slip, I created an "Accounts.tsx" page but forgot to exclude it from my commit.

elliotBraem commented 1 year ago

I would really like this too, this is awesome!

mlynch commented 1 year ago

Thanks for the PR. Looks like there might be some outstanding issues so I will wait for those to resolve before considering this. I wasn't sure when I started this project whether JS or TS would be better. Does anyone know what the breakdown of people using JS vs TS is in the Next.js ecosystem?

amunrarara commented 1 year ago

Ah, sorry for the delay here, I've been pulled into other work and this PR slipped my mind.

TS is hailed as the far better option in the JS vs TS war as it provides a type-safe dev environment and significantly reduces the number of potential runtime errors in a production environment. I'm not sure about the statistic, JS vs TS users, but I am sure at least that TS is a far more dependable and professionally-viable language.

That said, of course it is excellent to have a JS version available for folks unfamiliar with TS, I remember the frustrations of my pre-TS days, and it is a great relief to have an accessible boilerplate.

“Go not to the Elves for counsel, for they will say both no and yes.” - Frodo Baggins

That said, TypeScript is the clear winner for a boilerplate built on excellence, in my opinion.

amunrarara commented 1 year ago

Update, I've made some updates but noticed more errors, so I'm going to circle back soon :-)

I've included another Route path in the next commit, as it seems to silence the again-persistent isProxied error I'd mentioned above. Let's see if it does the trick!

I also ignored a TS error in /components/pages/Tabs.tsx which offered an error for a seeming non-issue.

And finally, I removed as many unused import statements as I could come across.

pavandeore commented 10 months ago

honestly please don't ruin this great project with TS Extra non-sense there will be a lot of boilerplate code everywhere!

nathanchapman commented 7 months ago

Hey @amunrarara, we ended up merging support for this in #53 due to the conflicts + age of this branch. Thanks for contributing!