Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"v-model" is syntax sugar emulating a two-way binding to simplify form creation. Under the hood it's a one-way bound prop, an event, and an implicit event handler. Ordinary events can't mutate state without an explicitly created handler.

  All props form a one-way-down binding between
  the child property and the parent one: when the
  parent property updates, it will flow down to
  the child, but not the other way around. This
  prevents child components from accidentally
  mutating the parent’s state, which can make
  your app’s data flow harder to understand.
https://vuejs.org/v2/guide/components-props.html#One-Way-Dat...

  AngularJS uses two-way binding between scopes,
  while Vue enforces a one-way data flow between
  components. This makes the flow of data easier
  to reason about in non-trivial applications.
https://vuejs.org/v2/guide/comparison.html#Data-binding


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: