Skip to content

Commit 53958e1

Browse files
committed
Add example using classes
1 parent 9cab0b0 commit 53958e1

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

+28
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,34 @@ run(() => ({
8282
}));
8383
```
8484

85+
### Using Classes
86+
87+
```js
88+
class Example {
89+
create(relative, absolute) {
90+
console.log("Create", relative, absolute);
91+
}
92+
93+
update(relative, absolute) {
94+
console.log("Update", relative, absolute);
95+
}
96+
97+
delete(absolute) {
98+
console.log("Delete", absolute);
99+
}
100+
}
101+
102+
const run = oneWayDataBindingLibraryJs({
103+
"foo.bar": () => new Example(),
104+
});
105+
106+
run(() => ({
107+
foo: {
108+
bar: {},
109+
},
110+
}));
111+
```
112+
85113
## 👀 Help & Documentation 🎉
86114

87115
### Path Matching

0 commit comments

Comments
 (0)