Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 980 Bytes

course-functional-components.md

File metadata and controls

21 lines (11 loc) · 980 Bytes

Functional Components

Why use them

It is about performance.

The idea is that you don't rerun the whole lifecycle at every component that is loaded.

This means that the view instance is not available in a functionnal component, as described in the migration docs from Vue 2 to Vue 3.

In more plain English, this means that the component does not support reactivity and cannot make a reference to itself through the this keyword.

What, why, when and how

I like this free article from Vue.js Developers publication on Medium.

It is a pretty complete article.

Read the Vue 3 docs for more.

See my follow-along project for this course.