Tweak template intro wording
@arthurevans is already working on this.
Since Jan 6, 2021.
- Dominant language
- TypeScript
- Stars
- 142
- Forks
- 230
- PR merge metrics
- No merged PRs in 30d
Description
Comments from #14, to handle after larger reorgs are done:
"Since "tag" is used to refer to HTML tags too, do we want to clarify that html is a "template literal tag" the first time we use it? I know that could be a lot of "tagged template literal tagged with the template literal tag" and such... so maybe not a great idea. Maybe there's a way to work the full phrase "tagged template literal" in there. Also thinking if we should emphasize that this is standard plain JS, considering how many other frameworks use some fork of JS.
And should we have a link to MDN on tagged template literals, or would we lose readers to the hyperlink void that way?"
"We don't mention that html is a function prior to this, we just call it a tag, so this could be a bit too much detail on that aspect. Could we say something around a lit-html template being an expression that returns a value that can be stored in variables, passed to and from functions, etc? I think JSX or React docs go into this a bit, for comparison."
"Rather than the specifics of the browser passing things to a tag function, we could describe the end result which is that the html tag captures the template strings and expression values separately, so that on repeated renders is can update only the expressions that changed.
One specific thing I have in mind there is around "re-render only the parts of template that have changed." - depending on our semantics here, the "template" doesn't change, only the values passed to it do. So we could lean more on saying we only update the expressions that change."
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.