-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Svelte 5: add examples of mixing runes and store to documention #11668
Comments
Slightly related to #9287 |
I don't think we need to add this to the documentation, therefore closing this. |
@dummdidumm Maybe my sample is kind of artificial. I totally get the point to not to do it in new projects. Nevertheless, this is of course an actual issue in my migration process. If I migrate a shared writeable to a state rune, I'm forces to update everything that is connected to this writeable in one go. I can't even build the dev server in between to verify the current changes. |
With "don't need to add this to the documentation" I meant that specific gotcha of using state inside a derived. We'll have documentation about how to migrate, including stores and examples etc. |
Describe the problem
In most cases, we will not be able to migrate to Svelte 5 and runes in one commit. But even migrating one Writeable to a $state might cause many dependent changes, e.g. in derived. The documentation is missing some hints, how to correctly map/link/convert between old stores and new runes.
I created a small REPL with some mixed use cases. What is missing the get the second button working correctly? (And this the other code 'best practice'?)
https://svelte-5-preview.vercel.app/#H4sIAAAAAAAACpVUS2-jMBD-KyOrByjtpsneSGC1t733sIdlFfGYJFbBRrYJjRD_fcfmkYa2Uvdixp7vMYMHOnbgJWoW_umYSCtkIftZ1-yBmUttN_qMpUHaa9mo3J7sdK54beJEAPCqlspAV6DiZywg1TCGz0YqfIBWcZNmJfZwULKCZNRbaZtO2DYRViaXQhuHRQLvIZp53trfLhD7ySy68fJmOrlCFNNyDxt_dCjRgDapsdp3Nlgou6M3yndj6G1IxRH9D2vFfcVfv1JLcFW59XT8fdoY-dZ2qDWAu1lpYE59TDzdZPsTLwoU18Y-8yDs0uK9zECeXb9Rxt53hp7X-raVT92nkls_EbvVPCS0yeJfsgVq8EjVmxOCRqqugKwxRgpIKcxPqThycXTpoQ9LaKV6oU6UwtyUlx-7VTYoFvxMfpcSo4QVXNdlegmPihdbuzwarOjE4GMuy6YSOoT101P9Ct_nZdivDyphbo6tYAy_p0sF6jXcrezhnO2uV9EvUjagcGxHirzk-UvUeX4UX0lB0McBNeBAA_dWZXPfRqPJNIhLIx3MkOvszaAZ9uxen6ff9-Du6D_Kd_gvVK6j7uYL-rDw5bz34LmxH0esNlwKf5epFQ3ZEk8YgucN_TeqBWF0Gp70o6pkwQ8cCxYa1WD_t_8HCc3hj-MEAAA=
Describe the proposed solution
Add best practice examples for partial migrations.
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: