Skip to content

add onBeforeActivate and onBeforeDeactivate hook #1518

Closed
@danyadev

Description

@danyadev

What problem does this feature solve?

  1. onActivated and onDeactivated are the only hooks that have no option with the Before prefix.

  2. I need onBeforeDeactivate to maintain the scroll position when closing or switching between components. In a little more detail I described this in another issue.

What does the proposed API look like?

onBeforeActivate(() => console.log('call #1'));
onActivated(() => console.log('call #2'));
onBeforeDeactivate(() => console.log('call #3'));
onDeactivated(() => console.log('call #4'));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions