I have installed the axios package with: npm i axios.
I import it in my redux action and Im trying to axios.post(), but the axios object is undefined.
It posts successfully with .fetch()
I'm using "axios": "^0.19.2" & "react": "^16.13.0".
import { axios } from "axios";
// Login User
export const login = () => dispatch => {
const requestOptions = {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email: "jan@gmail.com", password: "password" })
};
axios.post("https://freunder.uber.space/login", requestOptions)
.then(response => response.json())
};

