7nik
7nik
Solution 1: save the object in the intermediate variable and $derived from it. Solution 2: use $derived.by + function returning a getter. [Examples](https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAA71TTUvEMBD9KyF4aHFR22O_QATx5g-wHnbTqQTbtCTThSXkv5ukH9Eu3sSeMjPvvZl5STVteQeKZm-aimMPNKOP40gPFC-jC9QZOgQbq2GSzGUKxSQfsapFje0kGPJBECbhiPA0TAJBRjHRtSD26wAJc0lSkhuFFhI9xLll-urG5sLyexAYmGTh3ZYkyeeUWXkScJIiID_WLt_pG8xX8jVtDutpa7qou7HQ9UA2CLUogrST75bLA0bPqIyw5BAEM3dMiHFLNyD5GZpoUZvJbpEr815en__XPwsuKxL9sY3x3sfgUbr3KP3h0d3pEl1bMa_rPcPfFrZVdJYvd-ODNNomKe7DkxXFaUK0EoNgHWefpd60jH_SPqsyolliSs1Sz585lf0N-qHhLYeGZignMO_mC2wsq7BBAwAA).
Error and warning codes were switched to snake style: `a11y_no_static_element_interactions`, and some were renamed. It's shortly listed in the [breaking changes](https://svelte-5-preview.vercel.app/docs/breaking-changes).
For DX, it would be best to map the old codes to the new ones but emit a warning about using old codes.
~~a11y_autofocus seems to be [renamed](https://github.com/sveltejs/svelte/pull/11327/files#diff-876bbdbd7a9d5ac607fc224c40f210612473a4b91da8ca89b55ba4824f210b85L89) to a11y_misplaced_role.~~
Having two competitive sources of truth isn't a good design to begin with. But it can be unavoidable when using libs. $sync won't be highly performant - it still is...
> @Thiagolino8 The REPL doesn't work as intended parent and child are not synced. When you click the checkbox it errors (see the console). Typical `this` error. [Fixed REPL](https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAA41UwY6bMBD9FcfaA0iI7PZIQ6SqH7AfEHIgjkmsdWxkD2kr5H-vbQz2JmzVAxIz4zfz_B7MiDvGqcbVYcSivVFc4R99jwsMf3oX6DvlQG2s5aCIy-w0UayHfSMaYLdeKkA_r5R8UIU6JW-oweU2JMoJ3WB71p7mFBDxlTOq0YuGFmjWtVzT_Luru-eFdh0lkGV5vR99EogUWnJacnnJGty3igpAHlzZYcXccuph8kbstpGi2M3kTkycq3B2v5spTmdOA4AUSArCGfmoRzd97lujTXgze5CXC6co5bDbTuC91egmz6xj9IwrUAM1xSJpGPa_sjqhxkQpR7098Vks43K9kr3O8lm37Ra998DsJd5cSHir9eJLENLzjZpajgSkynw6nw81AFemS5-0cxKMmVxs4BJ9zBKcojAogSK8vLd8eAQHjbPVgRPCjt183WVu5a8QeCgLEfTXfOFsjEQ9eoVmuEDoWwSFFsA9QUQn7imNfOIRlf8WwhXxbTbR30epBWVZpi74-ldG-KJZZq_aERo8OXJ4PU6fzFOTB1ueGBzejtnmodHnTu7NJJ_jv_yxY-IPViCndoydzkHbuA1cfXUfkCvj5-d1oMqnteCYfV4NTPTDol09PiBNug8iP1UuWhnkfufakbCVk_zd4JU1cDR_ASBnz-ZlBQAA). There...
It's supposed the class is third-party or a complex/shared logic you moved out to its own file. However, it also raises the question of the best API shape of this...
@david-plugge, your issue is unrelated to this one, though the solution is the same: turn `#value` into setter + getter of `#unique_id_123`. Edit: your issue is #11476
What about letting people create custom event modifiers? ```ts function enter (fn: (ev: KeyboardEvent) => void) { return function (this: HTMLElement, ev: KeyboardEvent) { if (ev.key === "Enter") { fn.call(this,...
I still don't get the reasons. Moreover, it seems here are mixed component class (which can be obtained via module self-import) and the current component instance. --- > conditional rendering...