How to implement functional components in vue
This article mainly introduces vue how to achieve functional components, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
Functional component
Functional components, that is, stateless, cannot be instantiated, have no internal lifecycle processing methods, and are very lightweight, so they have high rendering performance, and are especially suitable for components that only rely on external data transfer to change.
It is written as follows:
1. Mark functional in the template tag
two。 Only accept props value
3. No script tag is required
Clicked hero: {{clicked}}
Import List from ". / List"; export default {name: "App", data: () = > ({clicked: ""}), components: {List}}; {{item}}
Thank you for reading this article carefully. I hope the article "how to implement functional components in vue" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!