deno-front-end / deno-front-end/eon
TSX/JSX vs Tagged Template Literals
- Dominant language
- TypeScript
- Stars
- 8
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
After reading about [TSX/JSX on the official TypeScript website](https://www.typescriptlang.org/docs/handbook/jsx.html), and a long conversation on the DFF discord channel, I'm now convinced that TSX/JSX (I'll call it XSX from now on) is a better option than [tagged template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) (which I'll call TTL) for a templating mechanism. Here's why:
1. **De Facto Standard**: TSX is as much of a standard as TS at this point. Deno supports both of these "standards". @timreichen was championing TTLs because of their support in the web platform. In my opinion, Deno extends the web platform to include TS(X), so, because this is a Deno-first framework, and Deno supports these "secondary standards", we should be treating them as part of the "augmented-js-standards"-based platform.
2. **Type Checking Supported Out-of-the-box**: Deno already type checks XSX, so doesn't need a custom TTL parser to be able to type check elements/attributes/children.
3. **Parsing the Template Occurs Ahead-of-time**: Parsing the template into function calls occurs AOT in XSX and occurs at runtime using native TTL. This runtime parsing incurs a performance cost.
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no files, tests, or entry points. Start by locating the current templating implementation and comparing its tagged-template approach with the proposed TSX/JSX approach; done would require an agreed direction and a defined migration scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100