I don't understand why my axios.get(firebase project / .json) file not working properly. What am I doing wrong here, any idea???
import axios from "axios";
class allClass extends Component {
state = {
item: [],
data: [],
loaded: false,
};
componentDidMount() {
axios
.get("https://foodie-ghar-default-rtdb.firebaseio.com/.json")
.then((data) => {
this.setState({ data: data.data, loaded: true });
})
.catch((err) => console.log("Some Error"))
.then(console.log("Lets try this "));
}