moving on with the lesson

This commit is contained in:
counterweight 2025-05-25 12:44:07 +02:00
parent 315a22614c
commit f1916e5c56
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
4 changed files with 809 additions and 23 deletions

View file

@ -1,24 +1,11 @@
import ReactDOM from 'react-dom/client'
import App from './App'
import ReactDOM from "react-dom/client";
import App from "./App";
const notes = [
{
id: 1,
content: 'HTML is easy',
important: true
},
{
id: 2,
content: 'Browser can execute only JavaScript',
important: false
},
{
id: 3,
content: 'GET and POST are the most important methods of HTTP protocol',
important: true
}
]
import axios from "axios";
ReactDOM.createRoot(document.getElementById('root')).render(
<App startingNotes={notes} />
)
axios.get("http://localhost:3001/notes").then((response) => {
const notes = response.data;
ReactDOM.createRoot(document.getElementById("root")).render(
<App startingNotes={notes} />
);
});