Questions tagged [vue-functional-component]
10 questions
2
votes
2 answers
Do Vue.js render functions allow return of an array of VNodes?
I am working on extending a Vue.js frontend application. I am currently inspecting a render function within a functional component. After looking over the docs, I had the current understanding that the render function within the functional component…

phnx
- 23
- 7
1
vote
0 answers
Vue 2: are template-based functional components as performant as render functions?
In Vue 2.5.0+ we have two different ways of implementing functional components: and using a render function. However, I've always wondered: are both ways actually equally performant?

Romalex
- 1,582
- 11
- 13
1
vote
1 answer
How to access env variable in functional component?
I would like to define a default value if a prop is not passed to my functional component.
This default value is an environement variable.
When I try the following, compilation will throw an error TypeError: Cannot read property 'env' of…

Pierre Burton
- 1,954
- 2
- 13
- 27
1
vote
1 answer
Advanced Vue.js Dynamic Functional Component using `:is` syntax and render function
Background: I've built a standard single file component that takes a name prop and looks in different places my app's directory structure and provides the first matched component with that name. It was created to allow for "child theming" in my…

slowFooMovement
- 498
- 5
- 14
1
vote
1 answer
How can i filter an state array in functional component in react native
I have an defined an array as state variable in a functional component
const [MessageResultsFirebase, setMessagesFirebase] = useState();
I want to filter it using Array.filter function to update the list.
var…

shruti
- 117
- 1
- 11
0
votes
2 answers
Why ref is not working in vue3 jsx functional components?
As shown in the following code, it's not working. If I put the code on (1) outside of the function, it works. Why? Or any solutions?
// vue3.2 jsx functinal components
import { ref } from 'vue'
// const count = ref(0) // (2) it works here
export…

MurphyChen
- 57
- 4
0
votes
1 answer
Dynamically add wrapper element in vue3 composition api
Consider a component below, which accepts tag as props.