4 ms·
Surely the huge win for JSX is that you can type check it? I have a Typescript + Angular 1 project. The app logic feels robust as Typescript makes sure I'm usi
by seanwilson 9y ago
Surely the huge win for JSX is that you can type check it?
I have a Typescript + Angular 1 project. The app logic feels robust as Typescript makes sure I'm using the right identifiers, variables aren't null/undefined etc. The Angular templates are a constant source of annoyance: they aren't type checked and aren't part of automatic variable renaming refactorings.
- tanguy_k 9y agoWow that is a good point! I have the same experience with Angular.js 1 and TypeScript. Can someone confirm that you cannot type check Vue.js templates (without using Vue.js JSX support of course)?
- seanwilson 9y agoI'm not a Vue user but I can't see how they would be type checkable without using JSX. For the Angular 1 project, I'm thinking as a stepping stone we could introduce JSX templates before migrating to Vue or React later.
- y2bd 9y agoThis is ultimately what makes React the right choice for me. A big part of the whole code=data thing is that code can be typed, which means now your data (markup) can be typed as well. Of course this only really matters if you use Typescript/Flow.