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

chore(web): remove createEventDispatcher from LoginForm #7177

Merged
merged 1 commit into from
Feb 18, 2024
Merged

Conversation

benmccann
Copy link
Contributor

@benmccann benmccann commented Feb 18, 2024

Svelte 5 is encouraging callback props over custom events

@benmccann benmccann changed the title chore: remove createEventDispatcher from LoginForm chore(web): remove createEventDispatcher from LoginForm Feb 18, 2024
Copy link

cloudflare-workers-and-pages bot commented Feb 18, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 009e1c4
Status: ✅  Deploy successful!
Preview URL: https://3014e7f4.immich.pages.dev
Branch Preview URL: https://rm-ced.immich.pages.dev

View logs

Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an interesting transition. What's the reason behind that?

@benmccann
Copy link
Contributor Author

That's an interesting transition. What's the reason behind that?

Events on elements (e.g. on:click on an a element) will be renamed to remove the : (e.g. onclick) and will be treated as regular props, which will enable event forwarding as has long been requested. As part of this, there was discussion around how to make events on components work in this new world and it was decided the best solution to the complications being introduced would be to remove them in favor of component props.

@danieldietzler
Copy link
Member

That's an interesting transition. What's the reason behind that?

Events on elements (e.g. on:click on an a element) will be renamed to remove the : (e.g. onclick) and will be treated as regular props, which will enable event forwarding as has long been requested. As part of this, there was discussion around how to make events on components work in this new world and it was decided the best solution to the complications being introduced would be to remove them in favor of component props.

Event forwarding! Yeeees!! :D

@alextran1502 alextran1502 merged commit 3480fe5 into main Feb 18, 2024
25 checks passed
@alextran1502 alextran1502 deleted the rm-ced branch February 18, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants