Skip to content

[Live] Emit system for component-to-component communication! #765

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

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

weaverryan
Copy link
Member

@weaverryan weaverryan commented Mar 29, 2023

Q A
Bug fix? no
New feature? yes
Tickets Fix #163
License MIT

Hi!

This PR - which is modeled after Livewire's excellent emitting system - adds a way for a component to communicate to another components by emitting an event. You could use this to, for example, emit an event in ComponentA to trigger ComponentB to re-render itself... which is exactly what's described in #163.

  • Possibly add a way to dispatch a DOM event from PHP

Cheers!

Copy link
Member

@kbond kbond left a comment

Choose a reason for hiding this comment

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

Looks great!

Would emitDown be useful?

@weaverryan weaverryan merged commit 6530065 into symfony:2.x Mar 30, 2023
@wannevancamp
Copy link
Contributor

Any ETA when this cool feature will be released?

@weaverryan
Copy link
Member Author

Hopefully it’s a matter of days or a week - but it could get delayed if we find some bugs in the giant 2.8 changes

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

Successfully merging this pull request may close these issues.

[LiveComponent] How to reload parent component when child component form submitted?
3 participants