What other HTTP methods are there (besides the main ones)?
Frontend
setup() (executed before beforeCreate and created) onBeforeMount onMounted onBeforeUpdate onUpdated onBeforeUnmount onUnmounted Parent: setup Parent: beforeCreate Parent: created Parent: beforeMount Child: setup Child: beforeCreate Child: created Child: beforeMount Child: mounted Parent: mounted <template> <button @click="onClick"> {{ text }} </button> </template> <script lang="ts"> interface Props { text: string; } const props = defineProps<Props>(); interface Emit { myClick: [string]; } const emits = defineEmit<Emit>(); function onClick() { } </script> <template> <MyButton :text="Нажми на меня"></MyButton> </template>
There is a variable that can be of type Book or Video. How to check the object type? What type does the type guard function return?
// comp.vue <template> <ul v-if="products != null"> <li v-for="(pr, i) in products">{{pr}}</li> </ul> </template> <script> import {getProducts} from ""; import {ref} from "vue"; const products = ref(null); onMounted(() => { getProducts().then(result => products.value = result) }) </script> setup() (executes before beforeCreate and created) onBeforeMount onMounted onBeforeUpdate onUpdated onBeforeUnmount onUnmounted Parent: setup Parent: beforeCreate Parent: created Parent: beforeMount Child: setup Child: beforeCreate Child: created Child: beforeMount Child: mounted Parent: mounted <template> <div> <slot name=""></slot> </div> </template>
What are the advantages of TypeScript?
What does an HTTP request consist of?
console.log('1'); setTimeout(() => console.log('2'), 0); Promise.resolve().then(() => console.log('3')); console.log('4');
Tell about closures in JavaScript. Where are closures used in Vue 3?
What are computed and watchers in Vue?
Call the getProducts function in a Vue 3 component and render the results in the template.
const events = [ { name: 'Маша', date: '[phone]' }, { name: 'Даша', date: '[phone]' }, { name: 'Ваня', date: '[phone]' }, { name: 'Петя', date: '[phone]' }, { name: 'Митя', date: '[phone]' }, ];
What is Virtual DOM and how does it work?
What is a Type Guard in TypeScript?
Tell me about lifecycle hooks in Vue 3. In what order are the hooks called for parent and child components during page mounting?
Tell about your work experience.
Have you transitioned from Vue 2 to Vue 3 and participated in the migration? Can you tell more details?
Write a fetch request that returns a list of products. Wrap it in a reusable function.
What is reactivity and how does it work in Vue? What is the difference between reactivity in Vue 2 and Vue 3?
Tell about HTTP protocols and methods used.
Where can the state be stored in Vue? When is it better to use Pinia/Vuex, and when provide/inject?