Hello World di Berbagai Tools Frontend

Sun Sep 26 2021 03:58:24 GMT+0000 (Coordinated Universal Time)

Astro

---
const nama = "World"
---

<h1>Hello {nama}</h1>

<style>
 h1 {
  color: red;
 }
</style>

HTML

<script>
 document.querySelector(".nama").innerText = "World"
</script>

<h1>Hello <span class="nama"></span></h1>

<style>
 h1 {
  color: red;
 }
</style>

Next

export default function App(){
 const nama = "World"
 return <>
  <h1>Hello {nama}

  <style jsx>{`
   h1 {
    color: red;
   }
  `}</style>
 </>
}

React

import React from 'react'
import './App.css'

export default function App(){
    const nama = 'World'
    return <h1>Hello {nama}</h1>
}

Svelte

<script>
 const nama = "World"
</script>

<h1>Hello {nama}</h1>

<style>
 h1 {
  color: red;
 }
</style>

Vue

<script setup>
    const nama = 'World'
</script>

<template>
    <h1>Hello {{nama}}</h1>
</template>

<style scoped>
    h1 {
        color: red;
    }
</style>

Buat yang mau donasi untuk kelangsungan komunitas Echlus, silahkan transfer ke halaman donasi kami.

Gg
1<u>2
kenapa
aa
x