score:0

const [data, setData] = React.useState([]);

React.useEffect(() => {
  fetch('path/to/your/data.json')
  .then(response => response.json())
  .then(data => setData(data));
}, []);

Related Query

More Query from same tag