-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[Svelte 5] bind:this on components not working #10026
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
Comments
EDIT! I'm not sure... Note that i changed bind:this to bind:name |
I'm binding the component element, for method / property access. are you suggesting I should bind every method/props? |
This could be the consequence of #9764 |
You're binding to a component that doesn't export anything. You're going to get |
I want to share an example with Svelte 5 bind:this |
then access to the props should use bind like the example @dm-de provided above ( bind:name={xxx} ) or using <svelte:options accessor={true} /> |
What dm-de proposed is perfectly fine for Legacy Svelte, but not for Svelte 5. |
The only working solution that does not throw an error. Note that a function is passed that assigns a node |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
'undefined' is logged with the following:
https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE41QwUrFMBD8lXXx8B6U9nmtbUHwL4wHX5raYJoNyfYVCfl32Rb0IIK3nWVmZ3YyTtaZhO1LRv-2GGzxKQSskD-DgHQzjg1WmGiNWjZd0tEGHpRXbJdAkeHZLARTpAUU1o2g-tApfBSaMwzGyV6gVzytXrMlD2mm7XSGLEvFmnwiZ2pH76eDf971Rfmu-bH13Whvu3-3O2925LlX-HC5KISr9WPLs019Pm6UodszHYrrykweyGtn9UefJUEZDn-Zd1JzsAbxFS-scKHRTtaM2HJcTam-65LT_-1LisggQugVbhTdqBAK9HAfIoV0kn9_vzob56iCLMJy91ek1_IF6Flw4s0BAAA=
Reproduction
Logs
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: