In Vue 2.5.0+ we have two different ways of implementing functional components: <template functional>
and using a render function. However, I've always wondered: are both ways actually equally performant?
Asked
Active
Viewed 202 times
1

Romalex
- 1,582
- 11
- 13
-
It's very easy to test. Make a Vue instance and feed it the same component until it breaks. Say 1 mil instances. Than change it to be the other type. Time them with `performance.now()` differences. See which one takes longer to render/breaks faster. Don't quote me on this, but I believe functional components use render function under the hood. In practice it might be insignificantly slower with ``. – tao Feb 22 '22 at 17:47