Replies: 1 comment 3 replies
-
Since the order, type, etc of arguments passed to a component function could change without warning (since it would be an internal change), I wouldn't recommend creating functions that depend on them. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Playground: https://svelte.dev/playground/c601b2e8051845ec89295630eb5eea86?version=5.25.3
Since Svelte 5 components are functions now, I've been experimenting with creating "Higher Order Components" / component wrapper functions that can augment props.
The goal I'm trying to achieve is creating a component that can receive any prop and also be able to receive some configuration without "reserving" a prop name (and not use context) so I've come up with passing extra props using a symbol key.
So when doing stuff that is undocumented I'm asking myself "is this bad?" and "can this break something" ?
Hoping to get some input on that.
Beta Was this translation helpful? Give feedback.
All reactions