Open ashiqchinju opened 4 years ago
"Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource." at productAction.js : 7
export const fetchProducts = () => async (dispatch) => { const res = await fetch("/api/products"); const data = await res.json(); console.log(data); dispatch({ type: FETCH_PRODUCTS, payload: data, }); };
please help me with this!!
use cors in the server and then for the res in ptoductaction use "http://localhost:5000/api/products:
"Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource." at productAction.js : 7
please help me with this!!