This commit is contained in:
12
05_react/uebungen/u01_hello-react/src/App.jsx
Normal file
12
05_react/uebungen/u01_hello-react/src/App.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import React from 'react';
|
||||
|
||||
function App() {
|
||||
console.log('init App'); // JS logic
|
||||
return (
|
||||
<div className="container pt-5">
|
||||
<h1>Hello React!</h1>
|
||||
</div>
|
||||
); // JSX - View
|
||||
}
|
||||
|
||||
export default App;
|
||||
12
05_react/uebungen/u01_hello-react/src/index.jsx
Normal file
12
05_react/uebungen/u01_hello-react/src/index.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import React, { StrictMode } from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
|
||||
// import von Komponente
|
||||
import App from './App';
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')) //
|
||||
.render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
</StrictMode>,
|
||||
);
|
||||
Reference in New Issue
Block a user