Settings

Theme

Show HN: GrainJS – a light TypeScript web framework

gristlabs.github.io

5 points by dsagal 2 months ago · 4 comments · 1 min read

Reader

GrainJS is a JavaScript / TypeScript library for building dynamic web applications.

- It's in part inspired by React, but based on observables (like Knockout) instead of virtual dom.

- It is lightweight, has no dependencies, and takes only ~30KB minified.

- It needs no special tooling. It's nothing more than a library.

- It supports convenient DOM-building in JS, event dispatching, DOM event subscriptions, 9disposable components, and in-code CSS styling.

- It's fully typed for use with TypeScript.

- It's proven its worth by powering Grist's rich frontend app.

Source code: https://github.com/gristlabs/grainjs/

arunkumars91 2 months ago

Why is it special? I was going over the link but couldn't get anything right away.

  • dsagalOP 2 months ago

    It enables much of what a large framework like React enables, but with a much simpler implementation, less tooling need to use it, and (some may argue) more convenient usage.

    • arunkumars91 a month ago

      Understood, but is it worth another learning curve?

      • dsagalOP a month ago

        I'd say if you know React or Vue or another framework and it fits your project well, then no. If you are learning though, there is arguably much less to learn (in particular, not having to juggle 3 languages). And if you are building something very serious, it's suitable: nearly all of Grist frontend is GrainJS, and it's a very big performant real-time collaborative long-lived single-page app.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection