You are on page 1of 1

module 03

perfecting computed props


by Michael Thiessen

3.0 perfecting computed 3.3 deriving your state


props By deriving values from other state you greatly
simplify your components.
Only a small fraction of the features in Vue are
needed to get most of the benefit. Props and other pieces of state can be replaced
by computed props.
Computed props are by far the most important
feature to understand deeply. Computed props are simpler than state because
you aren’t responsible for updating them at the
correct times.
3.1 the most important feature You reduce the number of moving pieces in your
in Vue application.

Declarative code lets us focus on the task while


Vue handles the details.
The reason you love working with Vue is
probably because it lets you write declarative
code.
The more you use computed props the more
declarative you can make your code.

3.2 composing computed


props
We can compose computed props to create
more complex computed props.
This makes it easier to write and debug our
computed props.
It also makes it easier to reuse, because we can
easily reuse these intermediate values without
having to refactor.

clean components

You might also like