Skip to content

Add support for each snippet. #14288

Closed as not planned
Closed as not planned
@vhtmui

Description

@vhtmui

Describe the problem

Can not each the snippets.
Demo

<script>
	let {children, ...others} = $props();

	let fns = Object.keys(others);
</script>

<div>
	<!-- hope this work -->
	{#each others as other}
		{@render other?.()}
	{/each}

	<!-- this work but a bit verbose and not stable -->
	{#each fns as fn}
		{@render others[fn]()}
	{/each}
</div>

Describe the proposed solution

Wish to add a special prop similar to children, and can be enumerated directly

Importance

nice to have

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