-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
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
Labels
No labels