score:1

Accepted answer
import React from 'react';
import axios from 'axios';

const fetchData = async () => {
  const result = await axios(
    'https://localhost:44376/api/machines',
  );
  return JSON.stringify(result, null, 2);
};

const App = () => {
  const result = await fetchData()
  console.log(result)

  return <div>Main App<div>
}

export default App

Related Query

More Query from same tag