Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

navigateAction debounce #111

Open
Diokuz opened this issue Feb 27, 2016 · 0 comments
Open

navigateAction debounce #111

Diokuz opened this issue Feb 27, 2016 · 0 comments

Comments

@Diokuz
Copy link

Diokuz commented Feb 27, 2016

I have a code, that redirects somewhere, like this:

    componentWillReceiveProps(props) {
        if (props.redirect) {
            this.context.executeAction(navigateAction, {...});
        }
    }

The problem is that it is an async action, and executeAction can be invoked multiple times before the component will die.

What is the best approach to disable another executeAction while the very first redirect is not completed?

Now Im use once decorator, but I dont think that this is the best way.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant