fullstackopen-notes/parts/2/renderingCollections/src/main.jsx

12 lines
294 B
React
Raw Normal View History

2025-05-25 12:44:07 +02:00
import ReactDOM from "react-dom/client";
import App from "./App";
2025-05-20 16:21:42 +02:00
2025-05-25 12:44:07 +02:00
import axios from "axios";
2025-05-20 16:21:42 +02:00
2025-05-25 12:44:07 +02:00
axios.get("http://localhost:3001/notes").then((response) => {
const notes = response.data;
ReactDOM.createRoot(document.getElementById("root")).render(
<App startingNotes={notes} />
);
});