reactjs - Redux Action Method doesn't return any reponse -
i created following action method
export function searchproducts(searchquery) { console.log('redux - searchquery: ', searchquery); return { types: [search, search_success, search_fail], promise: (client) => { console.log('client is: ', client); client.get('/products/search/:' + searchquery); } }; }
but when call function, prints first console command doesn't return anything. doesn't print console.log('client is: ', client);
problem?
here console snapshot:
redux action object's have 1 requirement, has have key value of type. object should this...
return { type: "someaction", payload: somevalue };
Comments
Post a Comment