Shortest “Hello, world!” app in JavaScript frameworks

in Code Write a comment

Let’s compare the most popular JavaScript frameworks by implementing the shortest “Hello, world!” app.

The goal is to write the shortest possible app that will display “Hello, world!” on the screen.

“Hello, world!” in React


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



Hello, world!

, document.getElementById('root') );

React version of the smallest “Hello, world!” is impressive. Now let’s see how it looks in Vue.js.

“Hello, world!” in Vue.js


<div id="app"><h1>{{ message }}</h1></div>


new Vue({
  el: '#app',
  data: {
    message: 'Hello, world!'

Hi, I'm Renat 👋


If you know a shorter version or want to add another example please share it in the comments below.
Renat Galyamov

Want to share this with your friends?

PS: Make sure you check other JavaScript tutorials, e.g. how to create an array of numbers in JavaScript, generate an array of years in JavaScript or Toggle class onclick in plain inline JavaScript.

A collection of UI components for
Bootstrap 4/5 and Vue.js

Get now

Write a Comment