We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
root component doesn't allow using map, works with object and key but Map is more performant for lookups.
make a map that can return a svelte component then call with new dynamic element <map.get(key) />
No response
svelte 5
annoyance
The text was updated successfully, but these errors were encountered:
Only variable names and object properties are allowed there, not all expressions
You can instead do
{@const Widget = widgets.get(widget)} <Widget />
Or define Widget within the script tag, if both widgets and widget are available there
Widget
widgets
widget
Sorry, something went wrong.
yeah currently doing that for workaround, is there a design reason for not allowing maps, do you know?
They needed to draw a line somewhere: #12821 (comment)
yeah, that stinks. I would have said the line should be after maps, they are common but yeah not much to do.
No branches or pull requests
Describe the bug
root component doesn't allow using map, works with object and key but Map is more performant for lookups.
Reproduction
make a map that can return a svelte component
then call with new dynamic element
<map.get(key) />
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: