main
|
Last change
on this file since 15ec67f was 15ec67f, checked in by Filip Gavrilovski <filipgavrilovski28@…>, 6 months ago |
|
init
|
-
Property mode
set to
100644
|
|
File size:
338 bytes
|
| Line | |
|---|
| 1 | import { useEffect } from "react";
|
|---|
| 2 |
|
|---|
| 3 | function App() {
|
|---|
| 4 | useEffect(() => {
|
|---|
| 5 | const fetchData = async () => {
|
|---|
| 6 | const response = await fetch("http://localhost:8080/");
|
|---|
| 7 | const data = await response.json();
|
|---|
| 8 | console.log(data);
|
|---|
| 9 | };
|
|---|
| 10 | fetchData();
|
|---|
| 11 | });
|
|---|
| 12 |
|
|---|
| 13 | return (
|
|---|
| 14 | <>
|
|---|
| 15 | <p className="text-red-500">ok</p>
|
|---|
| 16 | </>
|
|---|
| 17 | );
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 | export default App;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.