DEV Community

Mamadou DIARRA (Afrocodeur)
Mamadou DIARRA (Afrocodeur)

Posted on

NativeDocument: the framework that combines reactivity, performance… and simplicity of use

Last week, I talked about a project based on a simple idea: bringing the power of reactivity without the performance and memory cost of today’s frameworks.

Today, I’m proud to introduce NativeDocument.

For a long time, I’ve been looking to push the limits of native JavaScript. My goal was to create a tool that combines cutting-edge reactivity with strong adherence to Web standards.

NativeDocument is my answer to this challenge.

What makes NativeDocument unique is its approach: no need to compile, build, or transpile your code. The same code works everywhere—whether you’re importing it via a CDN for a small project or using it in a modern environment like Vite or Webpack.

The framework adapts to your needs, not the other way around.

Based on local tests, here are some results compared with market leaders like Vue, React, and Angular:

  • Execution speed: NativeDocument is on average 1.5x faster than Vue, 2x faster than React, and 3x faster than Angular on critical DOM operations. Our overall score is nearly perfect, just behind native JavaScript.
  • Memory management: NativeDocument uses up to 1.4x less memory than React for a 10,000-line application.

Beyond performance, we’ve placed great emphasis on readability. NativeDocument offers a declarative syntax with a clear API that directly exposes the list of available HTML tags.

You code intuitively, while staying close to the native DOM.

For advanced use cases, several control structures are ready to use out of the box: ShowIf, Switch, Match, ForEach, and ForEachArray.

But the framework remains flexible: you can create your own control structures thanks to the built-in Anchors.

To validate these results, I submitted a pull request for NativeDocument to be included in the official JavaScript framework benchmark. A merge is planned for September.

I’m excited to hear your feedback and to see what you’ll build with this project.

👉 Check out the code and full benchmarks on GitHub:

NativeDocument #JavaScript #WebDev #MinimalFramework #Performance #Versatility #NoBuild #NoCompilation #NoTranspilation #NoRuntime #VanillaJS #React #VueJs

Top comments (0)