You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to propose a feature to support bracket notation for rendering dynamic components. Currently, only dot notation is supported, but adding support for bracket notation would provide more flexibility.
Correct, we'll not add this capability. Using $derived in the script or @const in the template to prepare the component should be easy enough for this somewhat uncommon case.
Describe the problem
I would like to propose a feature to support bracket notation for rendering dynamic components. Currently, only dot notation is supported, but adding support for bracket notation would provide more flexibility.
example:
Svelte Lab
While dot notation is useful for static keys, bracket notation would provide more flexibility for dynamic keys and expressions.
Describe the proposed solution
Allow the use of bracket notation to access and render components from an object, similar to how it works with other JavaScript objects. For example:
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: