-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[docs] simplify template literals to string primitives #6806
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
Conversation
Coming from python JS template literal syntax was new to me. This part of the otherwise fantastic tutorial threw me off, because I did not immediately notice the backticks. Like: "Oh, that's an interesting concept. But it doesn't work. Bummer." Took me a while to figure.
I don't know where the line is here about which JS features to explain in the docs. That could really easily get out of hand. If we do want to mention something here, I think it should be shorter and consist pretty much of just a link to MDN. |
I'm not entirely sure if we need this either, but I've heard on Discord before about this issue too. Perhaps we can do |
Reading this gave me the impression that you guys wanted the tutorial to be as easy and comprehensible as possible. If you decide to keep the backticks, then a tiny hint at that position would be really helpful imho :) |
That's true and it still is. But we would still need to draw the line between teaching Svelte and teaching JS. Nonetheless, I would approve this if we refactor the code as |
site/content/tutorial/02-reactivity/03-reactive-statements/text.md
Outdated
Show resolved
Hide resolved
I'm not quite sure which one you're referring to. This was the first one I saw in chapter 6, but there doesn't seem to be nested quotes: https://svelte.dev/tutorial/group-inputs |
Yeah in that tutorial, on line 7 there's the usage of single quotes in the template literals, which I think makes it more obvious (maybe that's just me). But the usage of those inline JS expressions should make it obvious too. |
…t.md Co-authored-by: Ben McCann <[email protected]>
site/content/tutorial/02-reactivity/03-reactive-statements/text.md
Outdated
Show resolved
Hide resolved
I prefer @bluwy's |
…t.md Co-authored-by: Ben McCann <[email protected]>
I've updated to use all single quotes instead. |
Coming from python JS template literal syntax was new to me. This part of the otherwise fantastic tutorial threw me off, because I did not immediately notice the backticks. Like: "Oh, that's an interesting concept. But it doesn't work. Bummer."
Took me a while to figure.