
Domains
Agile Management
Master Agile methodologies for efficient and timely project delivery.
View All Agile Management Coursesicon-refresh-cwCertifications
Scrum Alliance
16 Hours
Best Seller
Certified ScrumMaster (CSM) CertificationScrum Alliance
16 Hours
Best Seller
Certified Scrum Product Owner (CSPO) CertificationScaled Agile
16 Hours
Trending
Leading SAFe 6.0 CertificationScrum.org
16 Hours
Professional Scrum Master (PSM) CertificationScaled Agile
16 Hours
SAFe 6.0 Scrum Master (SSM) CertificationAdvanced Certifications
Scaled Agile, Inc.
32 Hours
Recommended
Implementing SAFe 6.0 (SPC) CertificationScaled Agile, Inc.
24 Hours
SAFe 6.0 Release Train Engineer (RTE) CertificationScaled Agile, Inc.
16 Hours
Trending
SAFe® 6.0 Product Owner/Product Manager (POPM)IC Agile
24 Hours
ICP Agile Certified Coaching (ICP-ACC)Scrum.org
16 Hours
Professional Scrum Product Owner I (PSPO I) TrainingMasters
32 Hours
Trending
Agile Management Master's Program32 Hours
Agile Excellence Master's ProgramOn-Demand Courses
Agile and ScrumRoles
Scrum MasterTech Courses and Bootcamps
Full Stack Developer BootcampAccreditation Bodies
Scrum AllianceTop Resources
Scrum TutorialProject Management
Gain expert skills to lead projects to success and timely completion.
View All Project Management Coursesicon-standCertifications
PMI
36 Hours
Best Seller
Project Management Professional (PMP) CertificationAxelos
32 Hours
PRINCE2 Foundation & Practitioner CertificationAxelos
16 Hours
PRINCE2 Foundation CertificationAxelos
16 Hours
PRINCE2 Practitioner CertificationSkills
Change ManagementMasters
Job Oriented
45 Hours
Trending
Project Management Master's ProgramUniversity Programs
45 Hours
Trending
Project Management Master's ProgramOn-Demand Courses
PRINCE2 Practitioner CourseRoles
Project ManagerAccreditation Bodies
PMITop Resources
Theories of MotivationCloud Computing
Learn to harness the cloud to deliver computing resources efficiently.
View All Cloud Computing Coursesicon-cloud-snowingCertifications
AWS
32 Hours
Best Seller
AWS Certified Solutions Architect - AssociateAWS
32 Hours
AWS Cloud Practitioner CertificationAWS
24 Hours
AWS DevOps CertificationMicrosoft
16 Hours
Azure Fundamentals CertificationMicrosoft
24 Hours
Best Seller
Azure Administrator CertificationMicrosoft
45 Hours
Recommended
Azure Data Engineer CertificationMicrosoft
32 Hours
Azure Solution Architect CertificationMicrosoft
40 Hours
Azure DevOps CertificationAWS
24 Hours
Systems Operations on AWS Certification TrainingAWS
24 Hours
Developing on AWSMasters
Job Oriented
48 Hours
New
AWS Cloud Architect Masters ProgramBootcamps
Career Kickstarter
100 Hours
Trending
Cloud Engineer BootcampRoles
Cloud EngineerOn-Demand Courses
AWS Certified Developer Associate - Complete GuideAuthorized Partners of
AWSTop Resources
Scrum TutorialIT Service Management
Understand how to plan, design, and optimize IT services efficiently.
View All DevOps Coursesicon-git-commitCertifications
Axelos
16 Hours
Best Seller
ITIL 4 Foundation CertificationAxelos
16 Hours
ITIL Practitioner CertificationPeopleCert
16 Hours
ISO 14001 Foundation CertificationPeopleCert
16 Hours
ISO 20000 CertificationPeopleCert
24 Hours
ISO 27000 Foundation CertificationAxelos
24 Hours
ITIL 4 Specialist: Create, Deliver and Support TrainingAxelos
24 Hours
ITIL 4 Specialist: Drive Stakeholder Value TrainingAxelos
16 Hours
ITIL 4 Strategist Direct, Plan and Improve TrainingOn-Demand Courses
ITIL 4 Specialist: Create, Deliver and Support ExamTop Resources
ITIL Practice TestData Science
Unlock valuable insights from data with advanced analytics.
View All Data Science Coursesicon-dataBootcamps
Job Oriented
6 Months
Trending
Data Science BootcampJob Oriented
289 Hours
Data Engineer BootcampJob Oriented
6 Months
Data Analyst BootcampJob Oriented
288 Hours
New
AI Engineer BootcampSkills
Data Science with PythonRoles
Data ScientistOn-Demand Courses
Data Analysis Using ExcelTop Resources
Machine Learning TutorialDevOps
Automate and streamline the delivery of products and services.
View All DevOps Coursesicon-terminal-squareCertifications
DevOps Institute
16 Hours
Best Seller
DevOps Foundation CertificationCNCF
32 Hours
New
Certified Kubernetes AdministratorDevops Institute
16 Hours
Devops LeaderSkills
KubernetesRoles
DevOps EngineerOn-Demand Courses
CI/CD with Jenkins XGlobal Accreditations
DevOps InstituteTop Resources
Top DevOps ProjectsBI And Visualization
Understand how to transform data into actionable, measurable insights.
View All BI And Visualization Coursesicon-microscopeBI and Visualization Tools
Certification
24 Hours
Recommended
Tableau CertificationCertification
24 Hours
Data Visualization with Tableau CertificationMicrosoft
24 Hours
Best Seller
Microsoft Power BI CertificationTIBCO
36 Hours
TIBCO Spotfire TrainingCertification
30 Hours
Data Visualization with QlikView CertificationCertification
16 Hours
Sisense BI CertificationOn-Demand Courses
Data Visualization Using Tableau TrainingTop Resources
Python Data Viz LibsCyber Security
Understand how to protect data and systems from threats or disasters.
View All Cyber Security Coursesicon-refresh-cwCertifications
CompTIA
40 Hours
Best Seller
CompTIA Security+EC-Council
40 Hours
Certified Ethical Hacker (CEH v12) CertificationISACA
22 Hours
Certified Information Systems Auditor (CISA) CertificationISACA
40 Hours
Certified Information Security Manager (CISM) Certification(ISC)²
40 Hours
Certified Information Systems Security Professional (CISSP)(ISC)²
40 Hours
Certified Cloud Security Professional (CCSP) Certification16 Hours
Certified Information Privacy Professional - Europe (CIPP-E) CertificationISACA
16 Hours
COBIT5 Foundation16 Hours
Payment Card Industry Security Standards (PCI-DSS) CertificationOn-Demand Courses
CISSPTop Resources
Laptops for IT SecurityWeb Development
Learn to create user-friendly, fast, and dynamic web applications.
View All Web Development Coursesicon-codeBootcamps
Career Kickstarter
6 Months
Best Seller
Full-Stack Developer BootcampJob Oriented
3 Months
Best Seller
UI/UX Design BootcampEnterprise Recommended
6 Months
Java Full Stack Developer BootcampCareer Kickstarter
490+ Hours
Front-End Development BootcampCareer Accelerator
4 Months
Backend Development Bootcamp (Node JS)Skills
ReactOn-Demand Courses
Angular TrainingTop Resources
Top HTML ProjectsBlockchain
Understand how transactions and databases work in blockchain technology.
View All Blockchain Coursesicon-stop-squareBlockchain Certifications
40 Hours
Blockchain Professional Certification32 Hours
Blockchain Solutions Architect Certification32 Hours
Blockchain Security Engineer Certification24 Hours
Blockchain Quality Engineer Certification5+ Hours
Blockchain 101 CertificationOn-Demand Courses
NFT Essentials 101: A Beginner's GuideTop Resources
Blockchain Interview QsProgramming
Learn to code efficiently and design software that solves problems.
View All Programming Coursesicon-codeSkills
Python CertificationInterview Prep
Career Accelerator
3 Months
Software Engineer Interview PrepOn-Demand Courses
Data Structures and Algorithms with JavaScriptTop Resources
Python TutorialWeb Development
4.5 Rating 70 Questions 70 mins read4 Readers

Vue.js is not only a progressive framework, it is known by developers as the progressive framework. Vue.js has earned its progressive framework term due to its unique characteristics. Although it is simple and flexible, it has various powerful features which attract many developers. It is still fresh in the development world, easy to maneuver and fairly direct. Vue.js permits the development of any desired application structure which frameworks such as Angular.js and React.js do not offer. Also, vue.js is an open-source framework. This particularly means a lot in the development environment. It is highly versatile and lightweight in nature. It is the view which allows the display of data packets in single-page applications. Those few mentioned qualities among many others have earned vue.js its ‘progressive nature’ badge. Vue.js is a user-friendly framework. It is the best choice for beginners due to its ease of use. For the experienced developers, vue.js library provides a view layer. One can pick it and integrate with any other framework. As an HTML developer, the use of vue.js makes you realize how its learning curve is quite forgiving. It is fair to say vue.js was created as a simple version of all the other complex frameworks.
Expect to come across this popular question in Vue.js technical interview questions.
One of the unique features of vue.js is routing in Single Page Applications. The Vue router allows the transition from one page to another page on the user interface without necessarily the need for request from the server. Routing in Single Page Applications is achieved through the use of vue-router library. The collection offers a variety of feature sets, such as the personalized/customized scroll behavior, transitions, nested routes, HTML5 history mode and route structures and wildcards. Vue router also allows integration of some third party routers. In Vue applications, the Vue router is the library that allows navigation on the app. An example of achieved routing is in Vue app. In the application, it is easier to move from one page to another, thanks to the Vue router. Most of the modern single page applications use the Vue router. To build a simple page component without using the full features of the router library, simple routing is required, as in the example below:
const NotFound = { template: '<p>Page not found</p>' }
const Home = { template: '<p>home page</p>' }
const About = { template: '<p>about page</p>' }
const routes = {
'/': Home,
'/about': About
}
new Vue({
el: '#app',
data: {
currentRoute: window.location.pathname
},
computed: {
ViewComponent () {
return routes[this.currentRoute] || NotFound
}
},
render (h) { return h(this.ViewComponent) }
})Two-way data binding refers to data sharing between components class and the template. Two way binding is a powerful tool for developing JavaScript patterns. For instance when one side is changed, the other also changes to match the other. When a value is altered or changed in the input box, the value of the component class also changes. The best way to implement two-way data binding is by the use of v-model. V-model is essential as it allows updating of data. V-model assumes vue instance as the primary source of data and thus it ignores initial checked, selected or value attributes.
The initial values only need to be declared in the JavaScript. For instance:
<input type=”text” :value=”nameInput” @keyup= “nameInput = $event.target.value”>
The data attribute ‘nameInput’ is assigned the input box when there is an event in ‘keyup’. This way, we are binding the input box to the data attribute and that is how two-way binding is achieved. There is a firm relationship flanked by the form field and information property. Compared to manual setup, v-model handles the process quicker and more efficiently.
It's no surprise that this one pops up often in Vue.js interview questions.
Directive is a piece of instruction to perform a certain task. In vue.js a directive is a sign that directs the library to perform an action to the DOM. Directives in Vue.js are much simpler to understand compared to Angular.js. Directives in vue.js are in HTML prefix format. Some of the directives include; v-show, v-if, v-on, v-for, v-bind and v-model.
They appear in the following format;
<element Prefix-directiveId=”[argument:] expression [| filters…]”> </element>
Directives give permission to the template to act according to the changes in accordance to the defined logic by use of methods, data properties and inline expressions. An example of a directive is below.
<SignUpButton V-On:click= “doSignup” />
Here, a v-on directive is used to implement a click on the component. The message is to perform or allow the user to sign up. Apart from the above-mentioned directives, vue.js allows us to define our own directives based on what we need to perform. V directives are easier to understand and implement in the development world. Developers are prioritizing it although prior knowledge in Angular or any other structure is an added advantage. Prior knowledge provides a baseline for understanding how Document Object Model works and how directives manipulate it.
Vue.js provides an amazing platform for achieving dynamism or static values to be visual on the template. The use of direct hardcoding into the HTML, text outburst or modest expressions to transform the data has been a way for achieving the basics. Complex computations have necessitated the development of computed properties.
Computed property declaratively describes how one value solely depends on other values. Computed properties have revolutionized complex expressions in that we can create properties which can alter, manipulate, transform and present information in a more readable, efficient and understandable manner. Computed properties use methods in its library which is a huge plus. Methods are always recomputed when accessed unlike computed property which does not recompute thus providing accurate outputs. Computed properties can be used in so many ways. Data filtering, calculations, execution of Boolean conditions are just a few of the applications of computed properties. Below is a basic example of a computed property that uses count:
<div>
</template>
<script>
Export default {
name: “HelloWorld”,
data() {
return{
ShopNumber: 2
}
},
Computed: {
Count: function() {
Return ‘The shop number is ‘ + this.shopNumber
}
}
};
</script>
<div>
From the above count property, this.shopNumber is the dependency data and it returns a sentence that has this.shopnumber that is displayed in the template.
Values go up from child to parent using the $emit() event.
Step 01: Invoke the $emit() method in the child to send a piece of the data to its parent component.
//ChildComponent.vue <template> <button @click="$emit('name', 'Rajesh Bhagia')">click me</button> </template>
The first statement in the $emit method is the event name, and the second argument is the actual data to be passed to the parent component.
Step 02: Use the same event name prefixed with the @ symbol to define the child component inside the template in the parent component.
Its value will be a function, and it will have the actual value returned in its argument.
STEP 03: Declare the getName function inside the methods objects with an argument
//ParentComponent.vue <script> import ChildComponent from './ChildComponent.vue' export default { components: { ChildComponent }, methods:{ getName(value) {//Step 03 console.log(value); } } } </script> <template> <h3>Below is the child component within the parent component!</h3> <ChildComponent @name="getName"/> //STEP 02 </template>
The value passed to the getName function is the one assigned on the ChildComponent which is “Rajesh Bhagia”.So it is the one which is passed to the parent component by emitting an event.
>> Output after button click in child component
>> Rajesh Bhagia
Mutation methods alter the original array.
Following are the list of array mutation methods that initiate view updates
Below are the methods that don't mutate the original array but return a new array and are called non-mutation methods.
<script> export default { data() { return { question: '', answer: 'Questions mostly contain question mark' } }, watch: { question(newQuestion, oldQuestion) { if (newQuestion.indexOf('?') > -1) { this.getAnswer() } } }, methods: { async getAnswer() { this.answer = 'Thinking...' try { const res = await fetch('https://yesno.wtf/api') this.answer = (await res.json()).answer } catch (e) { this.answer = 'Error! Could not reach the API. ' + error } } } } </script> <template> <p> Ask a yes/no question: <input v-model="question" /> </p> <p>{{ answer }}</p> </template>
Defining watch, the function that prevents the modification in the state should have the same name as the reactive instance. In this case, it is observed that the function name has two parameters (newQuestion, oldQuestion) . If the function's name differs from the reactive instance, nothing will happen to the value of the 'answer' even if the question is modified and the question mark is included.
A common question in Vue.js advanced interview questions, don't miss this one. <script> export default { data() { return { someObject: {} } }, methods:{ print(){ const newObject = {} this.someObject = newObject console.log(newObject === this.someObject)} }, mounted() { this.print(); } } </script>
>> Output
False.
The Vue JavaScript framework is "reactive," which can automatically refresh your data. Reactivity is when changes in the application state are automatically reflected in the DOM (Document Object Model), a programming API for HTML and XML documents.
In this case, we have a Proxy object (in our case someObject) that enables us to create a proxy for another object (in our case newObject), which can intercept and redefine fundamental operations for that object.
When this.someObject object is accessed, the value is a reactive proxy of the original newObject. The original newObject is left unchanged and will not be made reactive.
The use of Proxy does introduce a new caution to be aware of: the proxied object(someObject) is not equal to the original object(newObject) in terms of identity comparison (===).That is why the actual output is false rather than true, even if the value assigned to each object is the same.
In Vue.js component
Steps to create a Vue component called ‘ComponentOne’ inside the Vue instance.
Step 1: Create the component by defining a common element of the UI(User interface) to be displayed. Save the file with name ComponentFirst.vue
<template> <div><h1>This is coming from component First</h1></div> </template>
The component consists of an h1 tag nested in div tag to print ‘This is coming from component First’ at the size of heading one.
Step 2: Define the vue instance in which the component is imported (included)
<script> import ComponentOne from './ComponentFirst.vue' export default { components: { ComponentFirst } </script> <template> < h1 >Here is the reused component!</h1> <ComponentFirst /> <ComponentFirst /> </template>
>> Output