Reactivity in Juris
artydev

artydev @artydev

Joined:
Jul 17, 2019

Reactivity in Juris

Publish Date: Jun 30
0 0

What a ceremony using reactivity in React : hooks, effects...

Look how simple is it to make a component reactive in Juris Demo

const setupApp =  {
  states : {
    message : "Hello World"
  },
  layout :  {h1 : {text: () => app.getState("message")}}    
}
const app = new Juris(setupApp)

app.render();

app.subscribe("message", (updated, previous) => {
  console.log(`${updated} - ${previous}`)
}) 

setTimeout(() => app.setState("message", "I am about to change..."), 1000);

setTimeout(() => app.setState("message", "Bye World"), 2000);


Enter fullscreen mode Exit fullscreen mode

Could it be simpler ?

Don't let hyped framework to erase your Javascript skills. Rediscover the joy of getting full control on your app, without relying on hours of youtube tutorials

Comments 0 total

    Add comment