Closed
Description
TSX (= typed JSX) for React templates is a big advantage compared to Angular templates. It has many design time advantages.
- Angular 2 use strictly typed approach (Typescript), it's a shame to leave templates untyped.
- I can see a lot of official Angular examples like...
@Component({
template: `<div>
<h4>{{order + '. ' + title}}</h4>
</div>`
... why not to have those HTML fragments strictly typed...
@Component({
template: (<div>
<h4>{{order + '. ' + title}}</h4>
</div>)
... including all Atom or Visual Studio Code IDE benefits: find all symbol reference, rename symbol, syntax highlighting, auto indent, etc.
- when we have TypeScript fragments in HTML (like {{order + '. ' + title}} above), let's have it under compiler control.
- If somebody got used to write React strictly typed TSX templates in Atom or Visual Studio, then coding HTML fragments to untyped string is backward step.
- why not to use Typescript 1.8 (in beta now) custom JSX factories for compile time generation?
Metadata
Metadata
Assignees
Labels
No labels