Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to fetch data from react using axios

useEffect(()=>{
    axios.get(`http://localhost:5000/products`).then((response) => {
        console.log(response);
        //setProducts(response.data)
      });
},)
 
PREVIOUS NEXT
Tagged: #fetch #data #react #axios
ADD COMMENT
Topic
Name
3+2 =