Skip to content

Add sprae to MVC Frameworks and Libraries - #1159

Merged
gokaygurcan merged 1 commit into
sorrycc:masterfrom
dy:add-sprae
Sep 8, 2026
Merged

Add sprae to MVC Frameworks and Libraries#1159
gokaygurcan merged 1 commit into
sorrycc:masterfrom
dy:add-sprae

Conversation

@dy

@dy dy commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Checklist:

  • I've read and understood Contributing Guidelines.
  • I've added the new resource at the end of its section.
  • This resource is out there for a while, and actively maintained.
  • This resource is popular enough and has at least a few hundred stars on GitHub.

sprae adds reactivity to server-rendered HTML through :-prefixed attributes: :scope for state, :each for lists, :onclick for events. State is a plain object, expressions are plain JavaScript, and there is no build step, no compiler and no virtual DOM. 11.6kb min+gzip, zero dependencies.

It belongs in this section next to Alpine.js and Lucia, which cover the same "add behaviour to HTML you already rendered" job. Two things make it worth listing alongside them rather than as a duplicate:

  • Signals-based and pluggable. Reactivity runs on the TC39 signals proposal polyfill, Preact signals, or its own implementation, chosen by the host app. Lists are keyed by item identity automatically, so there is no :key to write or get wrong.
  • Runs under a strict CSP. The CSP build swaps new Function for an interpreter, so full JavaScript expressions work with no eval anywhere. That covers strict script-src 'self' policies and Chrome MV3 extensions, where Alpine's CSP build only accepts a restricted subset (no arrow functions, template literals, spread, or globals).

On the checklist items:

  • Maintained: first released November 2022, 13 major versions, most recent release this month. Zero dependencies.
  • Tested and documented: the full suite runs on every commit across both compilers and alternative signal implementations. Docs at https://sprae.js.org, MIT licensed.
  • Stars: 206 at the time of writing. Also included in the official js-framework-benchmark, if third-party validation is more useful than the star count.

Apologies for missing the template on the first pass, and thanks for the review.

@gokaygurcan

Copy link
Copy Markdown
Collaborator

Please follow the PR template.

@dy

dy commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @gokaygurcan — fixed. The description now follows the template with the checklist filled in, and I moved the entry to the end of the section as the checklist requires (it was next to Alpine.js before).

@gokaygurcan
gokaygurcan merged commit 9320c76 into sorrycc:master Sep 8, 2026
1 check passed
@dy
dy deleted the add-sprae branch September 8, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants