The definition of one-way data flow is confusing
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 11.8k
- Forks
- 7.9k
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 11
Descripción
I was researching about data binding concept.
then found followings.
one-way data bindingtwo-way data binding
What I understand about data binding is about how Data and View are affecting each other.
one-way data bindingis using event-listener function to achieveView to DataData to Viewtogether.
(i.e, displaying input value in<p>tag.)two way data bindingis using the binding syntax (not using event-listener) and it can achieveView to DataData to View
(i.e, displaying input value in<p>tag.)
but when I read the official React document on react.dev.
It talks about one way data flow which is a bit confusing expression then it says this concept is about top to bottom parent to child. (which is completely different from the definition of one-way data binding).
// from the link below.
Remember: React uses one-way data flow, passing data down the component hierarchy from parent to child component.
https://react.dev/learn/thinking-in-react#step-4-identify-where-your-state-should-live
then when it talks about two way data binding the document brings displaying the input value on screen.
Which is not related to topic about Top to Bottom.
// from the link below.
React makes this data flow explicit, but it requires a little more typing than two-way data binding. If you try to type or check the box in the example above, you’ll see that React ignores your input.
https://react.dev/learn/thinking-in-react#step-5-add-inverse-data-flow
I feel like this concept needs to be updated to clarify the concept of data binding.
or if the document content is correct, Can someone explain what I am missing or confused about this document?
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con las secciones enlazadas de Thinking in React, especialmente «Identify Where Your State Should Live» y «Add Inverse Data Flow», y compara cómo utilizan «one-way data flow» y «two-way data binding». Se considera terminado cuando la documentación distingue claramente estos conceptos o explica la terminología que causó la confusión.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, react
- Área
- documentation
- Tipo de issue
- Documentación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100