You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the Quick Start, Forms page: https://reactjs.org/docs/forms.html
there is the sentence:
"The following example shows how a ref can be used to access file(s) in a submit handler"
There is no explanation at all of what a ref is. It's assumed that the reader knows what is being talked about.
When I was trying to understand the example, I assumed to begin with that "ref" was simply some HTML attribute with which I was not familiar.
When I was trying to reproduce the example (by erasing the original and just writing it myself), the following is what I came up with. It doesn't use a ref at all, but gives the name with the path.
I'm not sure that the example with the ref is needed in the Quick Start section on forms. Wouldn't it be better as a part of the "Refs and the DOM" page?
The text was updated successfully, but these errors were encountered:
Oops. That is definitely unintentional. I think somebody wanted to add a doc for the input file type (this section didn't exist in the beginning) but forgot about the sequencing.
This initially happened in #323. We need to think about where to move this or how to restructure.
On the Quick Start, Forms page:
https://reactjs.org/docs/forms.html
there is the sentence:
"The following example shows how a ref can be used to access file(s) in a submit handler"
There is no explanation at all of what a ref is. It's assumed that the reader knows what is being talked about.
When I was trying to understand the example, I assumed to begin with that "ref" was simply some HTML attribute with which I was not familiar.
It appears, however, that refs are a whole new, and rather complex side issue which need their own detailed explanation:
https://reactjs.org/docs/refs-and-the-dom.html
When I was trying to reproduce the example (by erasing the original and just writing it myself), the following is what I came up with. It doesn't use a ref at all, but gives the name with the path.
I'm not sure that the example with the ref is needed in the Quick Start section on forms. Wouldn't it be better as a part of the "Refs and the DOM" page?
The text was updated successfully, but these errors were encountered: