Skip to content

Access current model with outdated dispatch function #9

@atheck

Description

@atheck

Works:

useEffect(() => {
    Navigation.registerBackHandler("Page", () => dispatch(Msg.cancelRequest()));

    return () => Navigation.unregisterBackHandler("Page");
}, [dispatch]);

vs.

Doesn't work:

useEffect(() => {
    Navigation.registerBackHandler("Page", () => dispatch(Msg.cancelRequest()));

    return () => Navigation.unregisterBackHandler("Page");
}, []);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions