-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs should speak to the differences between html`` TTLs in other frameworks #100
Comments
Can you elaborate on this a bit? Thanks! |
I think that this section needs to be rearranged: https://enhance.dev/docs/learn/concepts/html/ The index should explain the concepts of Custom Element expansions, and maybe the differences between that and the "pages" which are authored in *.html files. Then, after you introduce the concept of render functions, you should mention the argument object and explain the purpose of it's two properties The current "render functions receive an argument with a property called here's the important part: "Note: many popular frameworks allow you to construct markup with a TTL. Enhance's "Example: in LitElement html`
${user.isloggedIn
? html`Welcome ${user.name}`
: html`Please log in`
}
`; in enhance it's just: html`
${user.isloggedIn
? `Welcome ${user.name}`
: `Please log in`
}
`; |
Enhance is not the first framework to construct DOM from an
html
tagged template literal. For example LitHTML also uses a TTL, and so some users may be familiar with using it. The difference between LitHTML and enhance is that LitHTML requires all the strings that you concat to behtml
. Enhance only requires the return value of the function to be tagged. It could eliminate some confusion if this were called out explicitly.The text was updated successfully, but these errors were encountered: