diff --git a/README.md b/README.md index 78be057..7e1b4b6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![nest badge](https://nest.land/badge.svg)](https://nest.land/package/Observe) -## Example +## Example (Deno) ```JavaScript let obs = new Observe("initial value"); // new observable with type String @@ -18,6 +18,29 @@ obs.setValue("another value"); // sets the value ``` Also check the examples folder for more examples +## Example (Basic html + js) +> Download Observe.js from the releases tab + +**index.html** +```html + + + +

Observable value test

+ + + + +``` + +**index.js** +```JavaScript +var observable = new Observe("s") +observable.bind((d)=>{ + console.log(d) +}) +observable.setValue("new val") +``` ## Methods ---