Lost static parts and fields information + top level caller
- Vorherrschende Sprache
- JavaScript
- Sterne
- 9k
- Forks
- 181
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I was wondering if there is any way to retain this information from the tagged template. The static parts could be used as a cache key for the output of the `html`` ` call.
It's also useful to know which parts are the fields/holes.
Lastly knowing which `h` call is the root node or top caller.
For the runtime a wrapper function would do the trick I think but `babel-plugin-htm` compiles to raw `h('div', {}, h('span'))` calls.
That might need something like
```js
wrap(() => h('div', {}, h('span')), statics, ...fields);
```
Beitragsleitfaden
Rechercherichtung
Beginne damit, den Runtime-Pfad mit der in der Issue beschriebenen Ausgabe von babel-plugin-htm zu vergleichen. Ermittle, wie statische Teile, Felder oder Lücken und der Root-h-Aufruf offengelegt werden sollten, und validiere anschließend die vorgeschlagene Wrapper-Form gegen beide Formen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- babel, javascript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100