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

Replace handle_info_or_assign/2 with macro #8

Open
schrockwell opened this issue Aug 21, 2024 · 0 comments
Open

Replace handle_info_or_assign/2 with macro #8

schrockwell opened this issue Aug 21, 2024 · 0 comments

Comments

@schrockwell
Copy link

schrockwell commented Aug 21, 2024

My library live_event works similarly to this one. I used this defoverridable trick, which I learned from the Surface, to prevent the need for the user to explicitly add a hook in update/2

https://github.com/schrockwell/live_event/blob/1cdf78ca8e215c196c30e98f17d849c6e2c5b8bb/lib/live_event/live_component.ex#L29

Thought you might find it handy for a cleaner API in components. Would be happy to put together a PR if this change is desired.

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

1 participant