For clarification I brought and example of two components to filter todos based on a filter prop (active, inactive or all if undefined). Functional components are functions. Most of the time, the function will be created by the Vue compiler. They will receive two arguments: props and context. In addition, stateful components now also include the ability to return multiple root nodes. Netlify. Passing classes, styles and refs to functional components. You could also try the React way and add to the project the JSX syntax of using html inside js, configuring webpack to understand this syntax, BUUUUT I know because I tried doing this (cuzI'm a smarty pants (is this slang still used? Using the Composition API, we are able to set up the internal state with ref as well as create a computed property that updates the style inside our React component. Question is - how can I make Functional component play nicely with the externally applied class when using a template? As standard component, no detached element should be visible. Functional components using Vue.component and JSX # In order to use JSX we recommend to use the vue-cli with the default setup from the first example. Please see following posts. What is expected? Now as I understand, Vue-loader compiles Functional component against render function context as explained here. The rendering function returns a virtual DOM node in the browser DOM that will be rendered by the Vue. Note: If you are coming from an Angular background, this is a similar concept to transclusion or content projection. In it we can create speedy components that do not hold state. In terms of what has changed, at a high level: In Vue 2, functional components had two primary use cases: However, in Vue 3, the performance of stateful components has improved to the point that the difference is negligible. Tutorials Newsletter eBooks ☰ Tutorials Newsletter eBooks. Using the previously mentioned example of a component, here is how it looks now. In 3.x, the performance difference between stateful and functional components has been drastically reduced and will be insignificant in most use cases. In order to make a SFC a functional one you add the the functional attribute to the