Ionic React Without Typescript

Hello people. I am excited to start using Ionic with React, but I came across a question. I’m not used to programming using Typescript, but I noticed that all projects generated using ionic start are generated in TS. I would like to know if there is any alternative or parameter that user can use to have the project created using ES6 or ES7 without Typescript?
Thanks.

Funny, I literally just tried manually converting a project generated by ionic start to not use TypeScript, just out of curiosity. And it seems to work. But I haven’t tried running in Android/iOS yet.

However I’m pretty sure (after running ionic help start and also looking at the starters project) that there isn’t a option in the Ionic CLI, and that TypeScript is the only officially supported setup.

So my recommendation would be to stick with TypeScript, unless you’re just experimenting like me.

After all TypeScript is a superset of JavaScript and supports optional type checking. If you set "strict": false in tsconfig.json that’ll disable mandatory checks, and at that point you can basically write regular JavaScript code, even if the file extension is .ts or .tsx.

Then you can learn more TypeScript features over time if you feel like. Quite a few people are reluctant at first but then end up liking TypeScript.

Funny, I literally just tried manually converting a project generated by ionic start to not use TypeScript, just out of curiosity. And it seems to work. But I haven’t tried running in Android/iOS yet.

Well, it works in the browser if you start the dev server with npm start, but not with ionic serve. There’s clearly something in the Ionic CLI that relies on TypeScript. Strange, because ionic serve is really just calling react-scripts underneath.

Just realised there’s an easier option for people who prefer JavaScript: simply rename all *.tsx files to *.js.

(TypeScript will still be used as the compiler, but you can write regular JavaScript code. This works because the project generated by the Ionic CLI has "allowJs": true in tsconfig.json.)