I was wondering how to run one method for all args passed to function and return them
Here’s an example what i want to achieve:
const getAllData = (args) =>{
args.map((arg)=> useDispatch(arg))
}
return args
and call it in another file for example
const [var1,var2,var3] = getAllData()
or
const allVars = getAllData([var1,var2,var3])