10

Five Days into Vue.JS: My First Five(5) Takeaways

 3 years ago
source link: https://hackernoon.com/five-days-into-vuejs-my-first-five5-takeaways-0h1a3140?source=rss
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Five Days into Vue.JS: My First Five(5) Takeaways

One of the most important concepts in Vue is the component system. It’s a very behavior that allows large-scale applications to be decomposed into small re-usable components.

0 reactions

Let's say we have a webpage with the root component where the header, main, and aside components are nested. The section and aside sub-components can also have child components nested in them. This is the same as the component system in React.

0 reactions

2. It’s mostly about binding with directives:

0 reactions

Vue generally links (or

bind
) data and conditions to DOM elements (or attributes) using what is known as
directives
. Directives are special attributes provided by Vue, that apply special reactive behavior to the rendered DOM. There are lots of directives in Vue, all prefixed with
v-
. Common directives include
v-if
,
v-bind
,
v-on
,
v-for
, etc.
0 reactions
<button @click="toggleBook">
  <span v-if="showBooks">Hide Books</span>
  <span v-else>Show Books</span>
</button>

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK