Skip to content
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: (Tutorial) Change spread and reassignment to .push() #1166

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lts20050703
Copy link

Svelte 5 now uses a runtime reactivity system, so no need to use the Svelte 4 workaround of spreading and reassigning anymore.

I'm debating whether we should also change the filter to a findIndex + splice, like technically it would save the need of allocating a new array, but it seems like a big change comparing to a simple change to .push()

I love Svelte, I'm doing the tutorial again to keep up to date with Svelte 5 & SvelteKit features.

This is my first ever PR, sorry if I did something wrong, please let me know and I will try my best to fix it!

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time.
  • Prefix your PR title with feat:, fix:, chore:, or docs:.
  • This message body should clearly illustrate what problems it solves.

Svelte 5 now uses a runtime reactivity system, so no need to use the Svelte 4 workaround of spreading and reassigning anymore.
Copy link

vercel bot commented Feb 23, 2025

@lts20050703 is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant