DEV Community

Cover image for React, Vue and Svelte: Comparing Structure Components
Clément Creusat
Clément Creusat

Posted on

React, Vue and Svelte: Comparing Structure Components

Structure component in...

React

Link

// imports
export const Component = () => {
  // logic
  // jsx
}
Enter fullscreen mode Exit fullscreen mode

Vue

Link

<script setup lang="ts">
// imports
// logic
</script>

<template>HTML goes here</template>

<style></style>
Enter fullscreen mode Exit fullscreen mode

Svelte

Link

<script lang="ts">
  // imports
  // logic
</script>

<!--HTML goes here-->

<style></style>
Enter fullscreen mode Exit fullscreen mode

File extension of a component in...

React

.jsx
.tsx with TypeScript

Vue

.Vue

Svelte

.Svelte

Top comments (0)