sveltejs / kit

web development, streamlined
https://svelte.dev/docs/kit
MIT License
18.73k stars 1.95k forks source link

Server data not reactive anymore in runes mode #12568

Open Rafterman1217 opened 3 months ago

Rafterman1217 commented 3 months 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 2 months ago

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

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