Cors error is showing not getting what is problem same thing is working fine in reactnative but not in reactjs
export const checkUser = () => { return async (dispatch) => { const token = getCookie("userToken"); const url =/auth/me`;
const response = await api
.post(url, { token })
.then((res) => {
return res;
})
.catch((error) => {
return error.response;
});
dispatch({
type: "CHECK_USER",
payload: response,
});
};
};
`