Dominic Gannaway

Results 324 comments of Dominic Gannaway

[What about doing this?](https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE42Qy2rDMBBFf2VQC7bB2F0nsUnbT-iy7sKRJ7WoLAlpnFKE_71IcpI-KHQnjc5cXY5nRyHRsc2zZ6qfkG3YvTGsZPRhwsWdUBKykjk9Wx4mO8etMNR2qiMxGW0JHmYireBo9QRZVadrlVaz7RfQR-aJtEVYVj5htQvDrFO7-pqvdmuyVlwK_tb4vICmhV6ipTx7DDMcgEaEQwSzYom9_I1Twhgk4KOQg0WVG6tNsYTHjvyea-UIaBTqFZprqW9U_BJ8hKpTL2eMD75es5dQNhVsWckmPYijwIFtyM64lBefCfmvUolB07l2CVVVhVIOFmjgNh7zYtupi9F3K6g_yD-EBvtrKtezIrTQXFbyu-Kn8OQR_Pnb1efeohrQXnWuYUWUkJbaTv3W8LJ8As8gqq9iAgAA)

> > [What about doing this?](https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE42Qy2rDMBBFf2VQC7bB2F0nsUnbT-iy7sKRJ7WoLAlpnFKE_71IcpI-KHQnjc5cXY5nRyHRsc2zZ6qfkG3YvTGsZPRhwsWdUBKykjk9Wx4mO8etMNR2qiMxGW0JHmYireBo9QRZVadrlVaz7RfQR-aJtEVYVj5htQvDrFO7-pqvdmuyVlwK_tb4vICmhV6ipTx7DDMcgEaEQwSzYom9_I1Twhgk4KOQg0WVG6tNsYTHjvyea-UIaBTqFZprqW9U_BJ8hKpTL2eMD75es5dQNhVsWckmPYijwIFtyM64lBefCfmvUolB07l2CVVVhVIOFmjgNh7zYtupi9F3K6g_yD-EBvtrKtezIrTQXFbyu-Kn8OQR_Pnb1efeohrQXnWuYUWUkJbaTv3W8LJ8As8gqq9iAgAA) > > It almost worked! But broke once I tried to target a nested property: [Try here](https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAA42R20rEMBBAf2WIC22hpO91K4o_IPhofajNrDuQnYRkuiql_y5p165X8C2ZnLmdjGpHFqOqH0bF3QFVrW68V6WSN58u8YhWUJUquiH0KbKNfSAvVy23QgfvgsCtY-mIMcAuuANkulojeimQXX7Cxxm7FxcQplPKglUxBbOWt9W5C2_XanPT8SIyeY8C_Z6sCci5D84XU3psZbzuHUcB2RM_Q3Pu9YXao7UOxhnS_RACsmghsTgDW2I_CCQJTasEX6VV8ERs6mNnB2x-TYRqma86zTelPc6zq1IdnKEdoVG1hAGncnW-Uv81bzF5_BBQgtY6rRdhggY28zEvvkp_CSTdk_3DeWJPdU0nHTQrn4_zejVkdwEjGWTJpmLBN8TRYy_5JiUV-oVknyf_zqK27rn4_pWGjjB-DDstvq4DssFw_s651mzP0PGq5Z_mHqd3pZr46rkCAAA=) That's because the nested property isn't reactive?...

@pauldemarco I mean you can put state into a store, that's what I was demonstrating – to make the store deeply reactive.

@pauldemarco I get that, but if you convert it into a deeply reactive state, it won't propagate changes back up to the store again. The store itself needs to define...

@pauldemarco You'll need to rework things or get the upstream library to move over to Svelte 5.

As pointed out above, you need to pass the store though without the `$` prefix, otherwise you're just passing the value, not the reactive store itself.

> Is that documented anywhere? (Did not see it in the migration guide) This works as intended [in legacy mode](https://svelte.dev/playground/4341cc700cfa4fb6b7795d4ae65a3051?version=5.0.5#H4sIAAAAAAAACnVQwUrEMBD9lTAsbAul9RzaBfHmQQ8ejYe2m2ognYRkurqE_LskXXVX3UMIb2bezHsvwKS09MCfA9DRSuC5ABVgPyd0a23tD1JTqg29l__VR4MkkTxwaP3olKWdQEFqtsYRC-zdKeoHLVlkkzMz267MxpNxcns2evem9P40UzcZna7kqfS0JDYZN7Pue20RcpNGsyBxdpNQLAW2zY8YbNfdg8I9T_wubNIXWbMTGO6fHh9qT07hq5qORW6VUSBUQPKDgJNbZKyuhHQu9DKmX50rQSVP4cvVJknMtkoWE7bOWF_88WMztVVoF2JJVicAl3mQTsBq89DrRXYh7a1zNqvZtknUS2cv8RNQPosMCgIAAA==). Legacy mode works regardless because it’s not fine grain.

> So, no, Svelte is not just "passing the value" by reference. That's because you're passing the store itself which is reactive. As soon as you reference a property of...

> JetLua passed the store in their example. The referenced example, [for primitives](https://svelte.dev/playground/4341cc700cfa4fb6b7795d4ae65a3051?version=5.0.5#H4sIAAAAAAAACnVQy26EMAz8lchaCZAQ9Ixgpaq3HtpDj00PsGvaSMGJErPtKuLfq8AuLX2cLI_t8cwE6JVGD9VzAD5bhGoGIAdqh9jdWlv4E2qOWNd6_As_GGIk9lBBvYCVsawMeeFGQi_KvSRJtT84ZXkvSQ3WOBZBvDvFbadRTKJ3ZhDJcl56Ng6TdfHuTenjZaMo5-7yPYnEGln0xg2iWQnTm0xSXa4fJdULSafoWMXlJuximWZx4f7p8aHw7BS9qv6czqNskgQ5MH4wVOxGnPJ_UvquaJvTj8kmqau2KD9cDeyiwNlBJqbYW2esT3-5sbFwrciOLKKoRgKNQ4dOwmLy1OoRm_Blsi7j0dbRy_QJQvJb5QMCAAA=), passed 0. Under the hood, that's not working as you think it is. We do some crazy...

Let me know how things work out on https://github.com/sveltejs/svelte/pull/13887 please.