Skip to content

Passing props with {@render} to a dynamically loaded component do not work #16679

@fsoft72

Description

@fsoft72

Describe the bug

Hello, it seems that passing props to a dynamically loaded component using {@render} does nit work

The case:

Test.svelte

<script>
	let { id } = $props();
</script>

<h1>TEST: {id}</h1>

Renderer.svelte

<script>
	let { component } = $props();
</script>

{@render component({id: 123})}

App.svelte

<script>
  import Test from './Test.svelte';	
	import Renderer from './Renderer.svelte';
</script>

RENDER (this should return TEST: 123)
<Renderer component={Test} />

Since I am passing {id: 123} to the Test component inside Renderer class, I'd expect it to show TEST: 123 but I only get TEST:

Reproduction

I have created a REPL here

Logs

System Info

System:
    OS: Linux 6.14 Ubuntu 25.04 25.04 (Plucky Puffin)
    CPU: (24) x64 AMD Ryzen 9 7900X 12-Core Processor
    Memory: 39.76 GB / 62.01 GB
    Container: Yes
    Shell: 5.2.37 - /bin/bash
  Binaries:
    Node: 22.13.1 - ~/.nvm/versions/node/v22.13.1/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v22.13.1/bin/yarn
    npm: 11.5.2 - ~/.nvm/versions/node/v22.13.1/bin/npm
    pnpm: 10.15.0 - ~/.local/share/pnpm/pnpm
    bun: 1.2.15 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 139.1.81.136
    Chrome: 139.0.7258.138

Severity

blocking all usage of svelte

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions