routed_hotwire 0.1.2 copy "routed_hotwire: ^0.1.2" to clipboard
routed_hotwire: ^0.1.2 copied to clipboard

Turbo and Stimulus helpers for the routed backend framework.

routed_hotwire #

Pub Version CI License Sponsor

Turbo/Stimulus helpers for the routed framework. The package wires Hotwire responses, server-rendered stream updates, and Stimulus command helpers into the Routed engine so you can build interactive hybrids without leaving Dart.

Features #

  • Response helpers for Turbo Streams, frames, redirects, and flash messages.
  • Stimulus controller scaffolds and middleware to register assets.
  • Testing utilities layered on top of routed_testing / server_testing.
  • Example apps showing Hotwire navigation, optimistic updates, and logging.

Install #

dependencies:
  routed_hotwire: ^0.1.0

Turbo-first apps typically include routed, routed_testing, and server_testing dev dependencies as well.

Usage #

import 'package:routed_hotwire/routed_hotwire.dart';

router.post('/notes', (ctx) async {
  final note = await notes.create(ctx.input('content'));
  return turboStream((streams) {
    streams.append('#notes', renderNote(note));
  });
});

See the example/ directory for a runnable Todo app with Turbo navigation and Stimulus controllers.

Funding #

If this adapter saves you time, consider supporting the work on Buy Me a Coffee.

0
likes
0
points
305
downloads

Publisher

unverified uploader

Weekly Downloads

Turbo and Stimulus helpers for the routed backend framework.

Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

www.buymeacoffee.com

License

unknown (license)

Dependencies

crypto, intl, routed

More

Packages that depend on routed_hotwire