I have one function in Action file and need to call it from componenent file with parameters but while calling it, its giving error for function not defined
Component Code :
handleClick(e){
addinput({input1:this.refs.inp1.value,input2:this.refs.inp2.value}) // This function I have defined in action file
}
Action file code :
export function addinput(myval1) {
return {
type: 'ADD_INPUT',
payload: myval1
};
}
I am getting below error in console
Uncaught ReferenceError: addinput is not defined
Whats I am doing wrong here !!