We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9f9f82 commit b7dbf4aCopy full SHA for b7dbf4a
src/App.js
src/App.jsx
@@ -0,0 +1,23 @@
1
+import React, { useState, useEffect } from 'react';
2
+
3
+import './App.css';
4
5
+function App() {
6
+ const [appName, setAppName] = useState(null);
7
8
+ useEffect(() => {
9
+ fetch('api/group')
10
+ .then((res) => res.json())
11
+ .then((data) => setAppName(data.appName));
12
+ }, []);
13
14
+ return (
15
+ <div className="App">
16
+ <header className="App-header">
17
+ {appName ? `Hello ${appName}` : 'Hello World'}
18
+ </header>
19
+ </div>
20
+ );
21
+}
22
23
+export default App;
0 commit comments