Skip to content

Double tapping on link creates a double view #384

@AlexDM0

Description

@AlexDM0

Hi,

When using the example, if you click on a link twice quickly (so before the new view has finished the animation) it will trigger a duplicate of the required view to slide in. Is this something we need to check in our reducer implementation or is it a bug?

Very ugly workaround:

let startTime = new Date().valueOf();
let lastTime = new Date().valueOf();

const reducerCreate = params=>{
    const defaultReducer = Reducer(params);
    return (state, action)=>{
        // startTime so the application has booted, 250 for animation duration.
        if (new Date().valueOf() - lastTime < 250 && new Date().valueOf() - startTime > 1000) {
            return state;
        }
        lastTime = new Date().valueOf();
        return defaultReducer(state, action);
    }
};

I have a few big buttons that the user can click on and if they accidentally tap twice, I dont want to load 2 cards of the next view.

Regards

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