Skip to content
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

Binding export const props broke with Svelte 3.54 #8179

Closed
GauBen opened this issue Jan 9, 2023 · 2 comments
Closed

Binding export const props broke with Svelte 3.54 #8179

GauBen opened this issue Jan 9, 2023 · 2 comments

Comments

@GauBen
Copy link
Contributor

GauBen commented Jan 9, 2023

Describe the bug

I use export const to expose component methods and Svelte's behavior changed with the 3.54 release (probably because of Prevent running init binding unnecessarily).

It looks roughly like this:

Parent.svelte:

<script>
  let closeModal = () => {}
</script>

<Modal bind:closeModal />

<!-- Since Svelte 3.54, clicking this button does nothing -->
<button on:click={closeModal}>close</button>

Modal.svelte

<script>
  export const closeModal = () => { /* ... */ }
</script>

It used to work with Svelte <= 3.53.1.

I'm not sure if this is the best way to implement this kind of behavior, any advice would be welcome.


Related: #8168
Suspected breaking change: (edited) #7981

Reproduction

Logs

No response

System Info

-

Severity

annoyance

@dummdidumm
Copy link
Member

Duplicate of #8103, fixed through #8114, release pending

@dummdidumm dummdidumm closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2023
@GauBen
Copy link
Contributor Author

GauBen commented Jan 9, 2023

Thanks for the quick answer!

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

2 participants