Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

[Reactivity: each blocks] from svelte version 3.23.1 onwards this recipe no longer applies #36

Closed
opensas opened this issue Jun 9, 2020 · 2 comments
Labels
good first issue Good for newcomers

Comments

@opensas
Copy link
Contributor

opensas commented Jun 9, 2020

Reactivity: each blocks

Reactivity recipe, each blocks section says the following:

Only assignments to array items that are objects or arrays result in the array itself updating. If the array items are primitives, the change is not traced back to the original array. This is because Svelte only reassigns the actual array items and primitives are passed by value in javascript, not by reference.

From svelte version 3.23.1 this is no loger true:

See this repl running on svelte 3.23.1, where the issue has been fixed

And this one running on svelte 3.23.0 where the issue still applies

For context see svelte issue 4744

Proposed modification:

Add a note stating that this section only applies to svelte version lower than 3.23.1 (if you agree with this I can send a pull request)

@opensas opensas added the good first issue Good for newcomers label Jun 9, 2020
@swyxio
Copy link
Member

swyxio commented Jun 9, 2020

sure thing! i think also mentioned in #15 (comment)

opensas added a commit to opensas/recipes-mvp that referenced this issue Jun 9, 2020
@opensas
Copy link
Contributor Author

opensas commented Jun 11, 2020

@opensas opensas closed this as completed Jun 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants