skip to Main Content

Javascript – Why am I getting "ReferenceError: Property 'axios' doesn't exist, js engine: hermes" when I try to register a new user?

The part of the code that is causing the problem has the following syntax: import axios from "axios"; const handleLogin = () => { const user = { email:email, password:password, }; axios.post("http://localhost:8082/login", user).then((response) =>{ const token = response.data.token; AsyncStorage.setItem("authToken",token); router.replace("/(tabs)/home")…

VIEW QUESTION

React native – Render data once from API call in react

I'm building an app with React Native and having trouble showing the results from an API call. function getRecipes() { const [recipes, setRecipes] = React.useState([]); axios.get('http://localhost:5000/api/v1/recipes') .then(response => { var data = response.data.map((recipe: Object) => recipe) setRecipes(data); }).catch(err => {…

VIEW QUESTION
Back To Top
Search