Skip to content

Commit

Permalink
Added chaining example
Browse files Browse the repository at this point in the history
  • Loading branch information
duart38 committed Aug 24, 2020
1 parent 879a8bb commit 8890cee
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/example_chaining.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Observe from "../Observe.ts";

let obs = new Observe(1);

obs.bind((data) => {
console.log("update received");
console.log(data);
});

obs.setValue(1);
obs.setValue(
obs.setValue(
obs.reset().setValue(1,2,3,4,5,6) + 100
) + 200
)


0 comments on commit 8890cee

Please sign in to comment.