Answer the question
In order to leave comments, you need to log in
Is there a React.Fragment equivalent in Vue.js?
Hello. Can you please tell me if there is an analogue of React.Fragment in Vue.js?
React
import React, { Component } from 'react'
export default class Counter extends Component {
render() {
return (
<React.Fragment>
<h2>Counter</h2>
</React.Fragment>
)
}
}
<template>
<div>
<h2>{{ counter }}</h2>
</div>
</template>
<script>
export default {
data() {
return {
counter: 0
}
}
}
</script>
<style scoped>
</style>
Answer the question
In order to leave comments, you need to log in
No. There are crutches ( for example ) - you can use them. Well, or wait for Vue 3 - they say it will be there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question