First Look on Vue3 Props
Many web developer and apps developer can agree with us that props are an essential part of any modern Javascript framework. The ability to pass data between components is a…
From our archive. Written in 2020; some details may have moved on.

Many web developer and apps developer can agree with us that props are an essential part of any modern Javascript framework. The ability to pass data between components is a fundamental element of Vue projects. In the latest Vue3, there are a few differences on the way we can access props inside a Vue component. In this article, we’ll cover this new change as well as take a look at the decisions behind the switch.
Alright, let’s Start!
Why we suggest you use props? To answer it, first we have to understand what props are. Props are custom attributes that allow us to pass data from a parent component to one of its children when registered on a component. As result of that data transfer ability, we can organize our Vue projects and components into more modular components.
Let’s just jump into an example
In the previous version, a component’s props were just part of the `this` object and could simply be accessed by using this.propName. However, one huge change in Vue3 is the introduction of the setup method.
All of the code that used to be separated into different options like computed, data, watchers, etc. now contained in this setup method. One major detail about this new method is that `this` does not have the properties that it used to in Vue2.
Luckily, the way we use Vue3 props without ‘this’ is super simple. The new setup method actually takes two arguments
- context – an object that exposes specific properties that used to be found on `this`
- props – an object that contains a component’s props
This argument is the only argument we’re going to use in order to access our props. All we have to do is props.propName – we don’t need to use ‘this’ variable!
Why Vue change the way props work in Vue3? The main reason is to make it clearer `this` means in a component/method. In Vue2 ‘this’ cause ambiguity in what it refers to.
Making Vue to be more scalable for larger projects is the goal when Vue Team designing Vue3. In order to achieve that goal, the team decided to redesign the Options API to the Composition API. So, it results in better code organization.
As you can tell, Vue3 props work generally the same as Vue2, the main change is how we can access them inside our new setup method. We hope that this quick little lesson will help make the transition to Vue3 a little bit easier.
More articles
Choosing a CRM for a manufacturing business: what actually matters
Manufacturing sales is long-cycle and relationship-heavy. Most CRMs are built for neither. Here is what to look for, what to ignore, and how to tell the difference before you sign up.
Read article →
Neural Habitats: Designing Websites That Evolve With Each Visitor
The Web Is About to Get Wild In 2025, static websites feel like museum pieces. Even “personalized” pages — swapping banners or changing a hero image — are beginning to…
Read article →
Digital Fireflies: How Micro-Animations Spark Engagement in a Crowded Online Jungle
In the endless scroll of the internet, attention is fleeting. A tap, a swipe, and your carefully crafted message disappears into the digital undergrowth. Yet, just like fireflies glowing in…
Read article →