∴ spræ

Hydration for DOM tree

Simple progressive enhancement for HTML / JSX.
Add UI interactions with reactive attributes.
<script src="//unpkg.com/sprae"></script>

<div :scope="count=0">
  <button :onclick="count++">+</button>
  <button :onclick="count--">–</button>
  Count: <span :text="count"></span>
</div>

Reference

:text

Set text content.

<span :text="user.name">Guest</span>
:text

Set text content.

<span :text="user.name">Guest</span>

FAQ

Why another framework?

There is no full aesthetic satisfaction with other solutions.

Why sprae?

SPRAE stands for Simple PRogressive enhancement Æsthetic. Also it hydrates DOM tree non-invasively.

Why not Alpine.js?

Less syntax space, less magic, less weight, open state and extensibility.

Why not vanilla JS?

`querySelector` is wrong mantra.

Why not Next/React?

No time. But sprae works well with JSX.

Who cares for progressive enhancement / graceful degradation?

Who needs fast, fail-proof, accessible, SEO-optimized web.

Is it just a toy?

It is used in production, but it's fun and comes with sandbox.

Does it scale to complex state?

As far as you can handle it and CPU allows. Sprae has good performance.

Are signals overhyped?

Signals are the standard for reactivity.

Is no build step outdated?

Sprae saves the hassle configuring it, but as ESM that can be part of build pipeline as well.

Is new Function unsafe?

If your HTML comes from strangers, there is safe evaluator.

Components support?

Awaiting the DCE proposal, meanwhile we have to manage duplication.

Is there ecosystem?

Not yet.

TypeScript support?

If you need it please leave a request.

Is it stable?

Core is stable since v10.

How old is it?

enough years old (first commit Nov 7, 2022).

Will it be maintained long-term?

12 versions, 1.5k+ commits and future plans.

What’s future plan?

Plugins, components, integration cases, generators.

Is it backed by a company?

No. Just regular devs. You can support it!