DEV Community

LankyMoose
LankyMoose

Posted on

Introducing: Kiru v1 😁

Kiru is designed to be a comprehensive, lightweight solution for building interactive UIs on the web.

What started off as a 'React - but more' kind of venture turned into a quest to provide better app-building fundamentals. For v1, Kiru pivoted from maintaining a React-like component model with hooks, to going all-in with signals.

A small example:

function Counter() {
  const count = signal(0)

  return () => (
    <button onclick={() => count.value++}>
      Click Me! {count}
    </button>
  )
}
Enter fullscreen mode Exit fullscreen mode

State, lifecycle hooks and variables are created in a setup scope. If your component doesn't create any local state, it can just return JSX. This removes the inherent complexity of interpreting or mutating state across renders like how we do with React.

I really think this component model makes a lot of sense and naturally leads to better decisions about how to build complex apps.

Let me know what you think!

Kiru
Making Web Development Easy Again - rausten.dev

Top comments (0)