Skip to content

Svelte 5: "Cannot use fallback values with bind" #10241

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

Closed
NotSpaulding opened this issue Jan 19, 2024 · 3 comments
Closed

Svelte 5: "Cannot use fallback values with bind" #10241

NotSpaulding opened this issue Jan 19, 2024 · 3 comments

Comments

@NotSpaulding
Copy link

Describe the bug

When trying to use default values for component props and binding them to a variable when using the component it throws an error. This looks intended but it is very annoying and unnecessary, requiring the user to create hacky fixes for a very simple task.

Reproduction

Svelte 5 (error)
Svelte 5 (hacky fix)
Svelte 4 (example of how you'd implement this in Svelte 4)

Logs

No response

System Info

npmPackages:
  svelte: 5.0.0-next.37 => 5.0.0-next.37

Severity

annoyance

@JLAcostaEC
Copy link

Same here, I'm using svelte 5.0.0-next.42

@7nik
Copy link
Contributor

7nik commented Feb 2, 2024

It was intentionally introduced in #9764

@dummdidumm
Copy link
Member

This no longer throws when the binding has a value - which should be easy to do in the parent -, therefore closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants