Vue questions Flashcards

1
Q

what is vue?

A

a progressive component based framework for building frontend ui

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what are directives

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Explain The Vue Component Lifecycle

A

components have life cycles. we can use life cycle hooks to run code at certain stages. on created on mounted, on before updated, on updated, on unmounted,
on beforeDestroyed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What Are Computed Properties In Vue.js

A

another way to have reactive state in vue. this is really for derived values so we can do some processing on data or run some logic and return a value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is virtual DOM?

A

The Virtual DOM is a lightweight, in-memory copy of the real Document Object Model (DOM) used by frameworks like React to efficiently update user interfaces by comparing the virtual DOM with the previous version and only updating the necessary parts of the real DOM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Vue instance?

A

not a thing in vue 3 and has been replaced with createApp. I don’t really know

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How Does Vue.js Achieve Reactivity

A

To explain that, we will need to briefly discuss how Vue’s reactivity system works. When you use a ref in a template, and change the ref’s value later, Vue automatically detects the change and updates the DOM accordingly. This is made possible with a dependency-tracking based reactivity system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are props in Vue?

A

a way to pass data from parent components to child components. use the square brackets to define them […]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What Is Data Binding In Vue.js

A

we bind some value in html tag to ref value with v-bind: or just : . Also we use {{value}} to create ref for text interpolation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What Is A Vuejs Router

A

Vue Router is the official client-side routing solution for Vue.js, enabling single-page application (SPA) navigation by mapping URLs to components, allowing users to navigate between different parts of the application without full page reloads.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What Are Slots In Vue.js

A

In the simplest terms, slots in Vue allow you to pass content (HTML or components) from a parent component into a child component. Think of them as placeholders inside a child component where the parent can insert content.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly