Vue questions Flashcards
what is vue?
a progressive component based framework for building frontend ui
what are directives
Explain The Vue Component Lifecycle
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
What Are Computed Properties In Vue.js
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
What is virtual DOM?
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
What is Vue instance?
not a thing in vue 3 and has been replaced with createApp. I don’t really know
How Does Vue.js Achieve Reactivity
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.
What are props in Vue?
a way to pass data from parent components to child components. use the square brackets to define them […]
What Is Data Binding In Vue.js
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
What Is A Vuejs Router
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.
What Are Slots In Vue.js
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.