Skip to content

ability register multiple callbacks in yew-router and to de-register them #1248

@kellpossible

Description

@kellpossible

You can register callbacks with RouteService::register_callback(), the docs aren't clear, but reading the code it appears that it may only be possible to register a single callback. gloo_events::EventListener documentation seems to suggest that when registering a second callback and replacing RouteService::event_listener and the previous EventListener is dropped, it will drop the callback in the browser.

It would be nice to be able to register multiple callbacks, and have the ability to de-register them too.

At the very least it would be good to improve the documentation for the current behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions