diff --git a/.gitignore b/.gitignore index d1bde99ce..22761cd1d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .cache .DS_STORE .idea +.vscode node_modules public yarn-error.log \ No newline at end of file diff --git a/GLOSSARY.md b/GLOSSARY.md index 92bf8a6b5..df45c9343 100644 --- a/GLOSSARY.md +++ b/GLOSSARY.md @@ -18,6 +18,7 @@ Glossary of the translations of technical and React-specific terms. - tag - lifecycle - callback +- form/forms # Common Translations diff --git a/content/docs/forms.md b/content/docs/forms.md index 1a8b599d5..2dc6b6700 100644 --- a/content/docs/forms.md +++ b/content/docs/forms.md @@ -9,30 +9,30 @@ redirect_from: - "docs/forms-zh-CN.html" --- -HTML form elements work a little bit differently from other DOM elements in React, because form elements naturally keep some internal state. For example, this form in plain HTML accepts a single name: +Gli elementi HTML `form` funzionano in un modo un po' differente rispetto agli altri elementi DOM in React, la motivazione sta nel fatto che gli elementi form mantengono naturalmente uno stato interno. Ad esempio, questo form in puro HTML accetta un singolo nome: ```html
``` -This form has the default HTML form behavior of browsing to a new page when the user submits the form. If you want this behavior in React, it just works. But in most cases, it's convenient to have a JavaScript function that handles the submission of the form and has access to the data that the user entered into the form. The standard way to achieve this is with a technique called "controlled components". +Questo form si comporta come di consueto, facendo navigare l'utente in una nuova pagina quando viene inviato. In React, se vuoi avere lo stesso comportamento, non c'è bisogno di fare alcuna modifica. Ad ogni modo, potrebbe essere più conveniente avere una funzione JavaScript che gestisce l'invio del form e che ha accesso ai dati inseriti dall'utente. La tecnica standard con cui si può ottenere ciò prende il nome di "componenti controllati". -## Controlled Components {#controlled-components} +## Componenti Controllati {#controlled-components} -In HTML, form elements such as ``, `