incremental_dom_facade 0.0.3

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 40

incremental_dom_facade

Use Incremental DOM in Dart

Usage

A simple usage example:

import 'dart:html';
import 'package:incremental_dom_facade/incremental_dom_facade.dart';

main() {
  final d1 = new Data('data 1', true);
  final d2 = new Data('data 2', true);

  final parent = document.getElementById('output');

  patch(parent, (data) {
    render(data);
  }, d1);

  // or
  patch(parent, render, d1);

  // Alternatively
  patch(parent, (_) {
    render(d2);
  });
}

render(Data data) {
  elementVoid('input', '', ['type', 'text']);

  elementOpen('div', '', null);
  if (data.isDone) {
    text(data.text);
  }
  elementClose('div');
}

class Data {
  String text = 'default text';
  bool isDone = false;

  Data([this.text, this.isDone]);
}

Bugs, Fixes, Enhancements

All feedback, PRs and bug reports are welcome.

Changelog

0.0.2

Expose attributes, applyAttr and applyProp

0.0.1

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  incremental_dom_facade: "^0.0.3"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


      import 'package:incremental_dom_facade/incremental_dom_facade.dart';
  
Version Uploaded Documentation Archive
0.0.3 Dec 22, 2016 Go to the documentation of incremental_dom_facade 0.0.3 Download incremental_dom_facade 0.0.3 archive
0.0.2 Dec 21, 2016 Go to the documentation of incremental_dom_facade 0.0.2 Download incremental_dom_facade 0.0.2 archive
0.0.1 Dec 15, 2016 Go to the documentation of incremental_dom_facade 0.0.1 Download incremental_dom_facade 0.0.1 archive

Analysis

We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
51 / 100
Overall score:
Weighted score of the above. [more]
40
Learn more about scoring.

Platforms

Detected platforms: web

Primary library: package:incremental_dom_facade/incremental_dom_facade.dart with components: html, js.

Suggestions

  • Fix .analysis_options.

    We were unable to parse .analysis_options.

  • Package is getting outdated.

    The package was released 77 weeks ago.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use incremental_dom_facade.dart.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

  • Enable strong mode analysis.

    Strong mode helps you to detect bugs and potential issues earlier.Start your analysis_options.yaml file with the following:

    analyzer:
      strong-mode: true
    

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0
Dev dependencies
test >=0.12.0 <0.13.0