sveltejs / kit

web development, streamlined
https://kit.svelte.dev
MIT License
18.47k stars 1.89k forks source link

Server data not reactive anymore in runes mode #12568

Open Rafterman1217 opened 1 month ago

Rafterman1217 commented 1 month ago

Describe the bug

In runes mode

let {data} = $props()

returns data which is not bindable to eg. input elements etc. afaik this worked before and its also working when using 'let mode'

Reproduction

import type { PageServerLoad } from './$types';

export const load = (async ({params}) => {
    return {name: params.name};
}) satisfies PageServerLoad;
<script lang="ts">
    let {data} = $props()

</script>

<p>{data.name}</p>
<input type="text" bind:value={data.name} />

Logs

No response

System Info

I dont get output since I'm using pnpm, help appreciated

Severity

annoyance

Additional Information

No response

hyunbinseo commented 1 month ago

Regarding the system info, simply replace npx with pnpm dlx command.

pnpm dlx envinfo --system --binaries --browsers --npmPackages "{svelte,@sveltejs/*,vite}"