Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by spartanatreyu

5 hours ago

React's hello world:

```js

<div id="root"></div>

<script>

import React from 'https://esm.sh/react@19';

import ReactDOM from 'https://esm.sh/react-dom@19/client';

const root = ReactDOM.createRoot(document.getElementById('root'));

root.render(<h1>Hello, world!</h1>); </script>

```

---

HTML's hello world:

```html

<h1>Hello, world!</h1>

```

---

JS's hello world:

Nothing, it was already done in HTML

0 comments

spartanatreyu

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities