@hackage Shpadoinkle-backend-snabbdom0.1.0.0

Use the high-performance Snabbdom virtual dom library written in JavaScript.

Shpadoinkle Backend Snabbdom

Goldwater BSD-3 built with nix Hackage Hackage Deps Hackage CI

This package contains a script to setup the Snabbdom virtual dom library as a backend to render Shpadoinkle applications.

Snabbdom consists of an extremely simple, performant, and extensible core that is only ≈ 200 SLOC. It offers a modular architecture with rich functionality for extensions through custom modules. To keep the core simple, all non-essential functionality is delegated to modules.

These design decisions made Snabbdom a good fit for Shpadoinkle's first high-performance pure JavaScript backend. Right now Snabbdom is being provided via CloudFlare content delivery network (CDN) and is not included in this repo. This is great for getting started fast and having a transparent developer experience where you can simply switch to the backend of your choosing. However, this is not a stable long term approach as the CDN artifact could be removed at any time. If you wish to use Snabbdom in production, I recommend either:

  • Proactively monitoring the CDN endpoints
  • Wrap SnabbdomT in your own newtype and overriding the setup method in the Backend instance with a mechanism where you provide Snabbdom's JavaScript artifacts yourself.