-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
Description
What problem does this feature solve?
When a computed value is computed, it's called with this
as a parameter.
This allows us to write code like this:
computed: {
isHome: ({ $route }) => $route.name === 'home',
}
The same can't be done with the data method, due to it not being called with this
.
What does the proposed API look like?
data: ({ $someProperty }) => ({
someString: $someProperty.someString + " + something else",
}),