I'm trying to push these two variables current and duration to the redux store. And I'm getting this error. I'm new to this so can someone please tell me what am I doing wrong?
const timeUpdateHandler = (e) => {
const current = e.target.currentTime;
const duration = e.target.duration;
dispatch(timerUpdate(current, duration));
};
This is the action creator in the store file:
export const timerUpdate = (current, duration) => async (dispatch) => {
console.log(current);
dispatch({
type: PLAYER_TIMER_UPDATE,
payload: {
currentTime: current,
duration: duration,
},
});
};
