1.

What is a one-way data flow?

Answer»
  • One-way data FLOW means that the model is the only way we can change the value of data so it is the only source of truth. 
  • One-way data flows are deterministic, UNLIKE the two-way binding which is associated with several side effects that are difficult to identify and understand. 
  • In the one-way data flow, the view (UI) part of the application does not update automatically when the value of the data model is modified. Some custom code is needed to make it updated EVERY time a data model is changed. In Vue.js the DIRECTIVE v-bind is used for one-way data flow or binding. 
  • Generally, for one-way data flow, the UI aspect of the application cannot update automatically. This, in turn, RESULTS in a need to customize certain codes to help it update every time there is a change in the data model. 


Discussion

No Comment Found

Related InterviewSolutions