docs(nx): update 04-connect-to-api.md
This commit is contained in:
parent
965901f4e5
commit
82b96dece0
@ -5,7 +5,7 @@ Real-world applications do not live in isolation — they need APIs to talk
|
|||||||
**Let's change our application to fetch the data from the API.**
|
**Let's change our application to fetch the data from the API.**
|
||||||
|
|
||||||
```typescript jsx
|
```typescript jsx
|
||||||
export const App = () => {
|
const App = () => {
|
||||||
const [todos, setTodos] = useState<Todo[]>([]);
|
const [todos, setTodos] = useState<Todo[]>([]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -39,6 +39,8 @@ export const App = () => {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default App
|
||||||
```
|
```
|
||||||
|
|
||||||
!!!!!
|
!!!!!
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user