Search code examples
reduxactiondispatch

how can we pass multiple parameter using action in redux


i am trying to send current video object and timeStam of current selected video to action using dispatch but it does not work ..

onPause={(e)=>{dispatch(Pause(e.timeStamp,state.video))}}

but from this code of line it didn't work


Solution

  • I sent data through dispatch in the form of object like this

    onPause={(e) => {
                        dispatch(Pause({pauseTime: pauseTime, selectedVideoID: ID}));
                    }}