Skip to content

Component lifecycle events #283

@ryangjchandler

Description

@ryangjchandler

Still working on a PR for component events and general events, but wanted to get some event ideas from everyone too.

Currently, I'm thinking about the following:

  • Before component data is mutated
  • After component data is mutated
  • Before component is refreshed
  • After component is refreshed
  • After Alpine has finished loading

The other question of course would be which element does the event get fired on. Logically, I think it should be the parent component element, but there might be an argument for firing the event at the document level too and then giving the user the parent component element so that they can do their own conditional logic.

Would be great to get some ideas from @SimoTod @HugoDF or @calebporzio :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions