An open API service indexing awesome lists of open source software.

https://github.com/lorussogiacomoluca/react-post-form

Exercise #51 - 14/05/2025
https://github.com/lorussogiacomoluca/react-post-form

api-rest axios hooks javascript multifields postapi props react useeffect-hook usestate-hook

Last synced: about 2 months ago
JSON representation

Exercise #51 - 14/05/2025

Awesome Lists containing this project

README

          

# 📘 Esercizio 51

**Repo:** `react-post-form`
✍️ Oggi creeremo il nostro primo form multifield per inviare dati in **POST** ad un’API.

---

🎯 Dovremo creare una nuova app **React** che contenga un **form** per creare un nuovo post all’interno di un blog.

📩 I dati che il form dovrà inviare sono i seguenti:

- `author` (string) - L’autore del post
- `title` (string) - Il titolo del post
- `body` (string) - Il testo del post
- `public` (boolean) - Se il post deve essere pubblico (`true`) o una bozza (`false`)

🔗 **L’endpoint** a cui effettuare la chiamata POST è il seguente:
https://67c5b4f3351c081993fb1ab6.mockapi.io/api/posts

✅ Questo endpoint, in caso di successo, vi **restituisce i dati inviati**. Stampateli in console per **verificare di essere riusciti ad inviare correttamente tutto**!

---

📌 **Numero minimo di push: 7**