DUMB DEV Community

Cover image for Reactive HTML Without JavaScript Frameworks πŸ”₯

Reactive HTML Without JavaScript Frameworks πŸ”₯

Anthony Max on July 07, 2025

In the modern web development landscape, JavaScript frameworks like Vue, and Angular dominate discussions about reactive interfaces. However, it...
Collapse
 
artyprog profile image
ArtyProg • Edited

Hello nice work :-),

Here is another way to add reactivity, without any bundlers.
I know, this is a liitle out of subject, but I wanted to show you don't need hyped frameworks to get reactivity.

const app = new Juris();

app.setState('counter', 5);

const element = app.objectToHtml({
    div: {
        children: [
          { div: { text: () => app.getState("counter")}},
          { 
            button: {
              text: "INC", 
              onclick:() =>  { 
                const incedval =  app.getState("counter") + 1
                app.setState("counter", incedval) 
              } 
            } 
          }
        ]
    }
});

document.getElementById("app").append(element)
Enter fullscreen mode Exit fullscreen mode

You can test it here a component approach : Counter

Collapse
 
david_bussell14 profile image
David Bussell

In theory, this is possible, but you need to look in practice

Collapse
 
anthonymax profile image
Anthony Max

Agree

Collapse
 
gradylink profile image
grady.link

This is still running JavaScript. In my opinion I would prefer to use Alpine.js.

Collapse
 
anthonymax profile image
Anthony Max

Alpine.js is a fairly generic approach, not really server-oriented. Syntax-wise, it's very similar to jsx, but a bit weird.

Collapse
 
gradylink profile image
grady.link

Well then why not use htmx

Collapse
 
ankit_rattan profile image
Ankit Rattan

Well! That's great... πŸ’―

Collapse
 
anthonymax profile image
Anthony Max • Edited

Thanks!

Collapse
 
nadeem_zia_257af7e986ffc6 profile image
nadeem zia

Love to read about tech

Collapse
 
anthonymax profile image
Anthony Max

Me too

Collapse
 
parag_nandy_roy profile image
Parag Nandy Roy

Love this lightweight approach..

Collapse
 
anthonymax profile image
Anthony Max

Without a framework, create a normal application possible

Collapse
 
abhiwantechnology profile image
Abhiwan Technology

Very interesting, discussion is goin on related to using reactive HTML. Nowadays most of the India based top 3d game development services provider companies were doing such types of things to get some innovative solutions.

Collapse
 
shiva_shanker_k profile image
shiva shanker

Looks promising but risky for production! πŸ’‘ Better strategy: Start with Preact as drop-in React replacement - same code, 90% smaller bundle. Then optimize from there!

Collapse
 
getsetgopi profile image
GP

Handlebars ++ ?