diff --git a/05_react/unterricht/tag52/01_react-app-performance/src/components/examples/LazyComponent.jsx b/05_react/unterricht/tag52/01_react-app-performance/src/components/examples/LazyComponent.jsx
index e82178e..8b4e0f2 100644
--- a/05_react/unterricht/tag52/01_react-app-performance/src/components/examples/LazyComponent.jsx
+++ b/05_react/unterricht/tag52/01_react-app-performance/src/components/examples/LazyComponent.jsx
@@ -1,13 +1,19 @@
+import { useState } from 'react';
+
const LazyComponent = (props) => {
// const { } = props;
+ const [textLoaded, setTextLoaded] = useState('');
+
// Simulate a slow content placement // TODO: replace with fetch component
const wait = (delay) => new Promise((resolve) => setTimeout(resolve, delay));
- wait(3000);
+ wait(3000).then(() => {
+ setTextLoaded('Content fully loaded');
+ });
return (
-
I was loaded late!
+
I was loaded late: {textLoaded}
This text only appears after the code for this component has been loaded
);
diff --git a/05_react/unterricht/tag52/react-app/package-lock.json b/05_react/unterricht/tag52/react-app/package-lock.json
index b501afe..8b27f45 100644
--- a/05_react/unterricht/tag52/react-app/package-lock.json
+++ b/05_react/unterricht/tag52/react-app/package-lock.json
@@ -16,9 +16,9 @@
},
"devDependencies": {
"@types/react": "^19.2.18",
- "@types/react-dom": "^19.2.4",
+ "@types/react-dom": "^19.2.5",
"@vitejs/plugin-react": "^6.1.0",
- "oxlint": "^1.79.0",
+ "oxlint": "^1.80.0",
"sass-embedded": "^1.103.1",
"vite": "^8.2.2"
}
diff --git a/05_react/unterricht/tag52/react-app/package.json b/05_react/unterricht/tag52/react-app/package.json
index bf441d0..882699a 100644
--- a/05_react/unterricht/tag52/react-app/package.json
+++ b/05_react/unterricht/tag52/react-app/package.json
@@ -18,9 +18,9 @@
},
"devDependencies": {
"@types/react": "^19.2.18",
- "@types/react-dom": "^19.2.4",
+ "@types/react-dom": "^19.2.5",
"@vitejs/plugin-react": "^6.1.0",
- "oxlint": "^1.79.0",
+ "oxlint": "^1.80.0",
"sass-embedded": "^1.103.1",
"vite": "^8.2.2"
}