domino 0.8.1 copy "domino: ^0.8.1" to clipboard
domino: ^0.8.1 copied to clipboard

outdated

An incremental DOM library, with support for virtual DOM and components.

example/example.dart

import 'dart:html';

import 'package:domino/browser.dart';

void main() {
  window.onLoad.listen((_) => _main());
}

void _main() {
  registerView(root: document.getElementById('root')!, builderFn: _App().build);
}

class _App extends DomNode {
  int _counter = 0;

  @override
  void build(DomBuilder b) {
    b.visitAll([
      DomElement('button', id: 'app-button', events: {
        'click': (e) {
          _counter++;
          e.view.invalidate();
        },
      }),
      DomElement('span', id: 'app-count', text: 'Counter: $_counter'),
    ]);
  }
}
6
likes
0
pub points
48%
popularity

Publisher

verified publisheragilord.com

An incremental DOM library, with support for virtual DOM and components.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on domino