-
-
Notifications
You must be signed in to change notification settings - Fork 159
Update tutorial part 1 #274
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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Some canvas drawing that reacts to some interval at random? Well ... then you could also the interval directly ... huh. Goes to show that |
I added a Controversy alert: I removed the 'Lifecycle' section:
I also removed the 'Stores' section, because similarly we shouldn't be encouraging people to write new store code. This is obviously a little trickier for two reasons...
...but I still don't think it belongs in part 1, and if we have a store tutorial in part 2 it should be brief. Things are a bit lopsided now — the advanced section is much longer than the basic section. I think we could move some stuff (actions? etc) from part 2 to part 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff! Agree that it's weird to have tweened etc as store versions without having stores explained anywhere. I also think that it's still worth it to have a section on stores in "advanced svelte" - it doesn't need to be as big as now, it's enough to explain the shorthand and that there's a store package. I'm ok with removing the life cycle part.
apps/svelte.dev/content/tutorial/01-svelte/02-reactivity/04-effects/index.md
Outdated
Show resolved
Hide resolved
<select | ||
value={selected} | ||
on:change={() => (answer = '')} | ||
onchange={() => (answer = '')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the accompanying md file still has on:change
in it
…fects/index.md Co-authored-by: Simon H <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, assuming that stores will have a reduced version in the advanced section
Hi guys. I'm not sure if I should be writing this here or not, but just wanted to let you know that in the "reactivity / state" part of the tutorial, this part doesn't look correct to me : {count === 1 ? 'time' : 'times'} it should say this instead : {count <= 1 ? 'time' : 'times'} Otherwise the button label prints "times" plural when the button initializes with 0. Thanks. |
Right, because '0 time' is wrong. You only use the singular when there's 1 of something. That's why it's called 'singular' |
My bad. I didn't know that zero was considered plural in the English language. |
WIP. Effects is a TODO for now — I think we need it to be in this position, but I'm not sure what a good exercise would be (we should get rid of anything
console
based since we want to steer people towards$inspect
). Struggling to think of examples that shouldn't just be event handlers