-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
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
docs: svelte 5 event handler pass variables? #11671
Comments
I don't know what exactly you mean. Can you clarify? (It sounds like you mean https://svelte-5-preview.vercel.app/docs/event-handlers#bubbling-events, which is already described) |
While it's pretty easy to guess how to pass parameters using events, I kind of agree there is no "recommended" approach in the doc. I believe what @MentalGear is trying to say (it's just a guess) is that previously using Svelte 4
You could pass the value in the dispatch method ('detail value') and you would fetch it inside the event
Now with Svelte 5, there is no "documented" way on how you pass custom values and you also lose the "event" unless you pass it yourself.
|
- clarify that a callback prop means passing a function - enhance the example so that a parameter is passed and the prop is explicitly invoked to visualize the concept better closes #11671
- clarify that a callback prop means passing a function - enhance the example so that a parameter is passed and the prop is explicitly invoked to visualize the concept better closes #11671
Describe the problem
https://svelte-5-preview.vercel.app/docs/event-handlers
The docs do not describe how to pass variables with the event from a subComponent to overlying component.
Describe the proposed solution
Describe in the docs.
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: