We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c57e07 commit f24104fCopy full SHA for f24104f
readme.md
@@ -57,14 +57,14 @@ Uses [`.addEventListener()`](https://developer.mozilla.org/en-US/docs/Web/API/Ev
57
58
```ts
59
function ButtonClickListener(button: HTMLButtonElement) {
60
- function* initial() {
61
- yield on("click", clicked);
62
- yield listenTo(button, "click");
63
- }
64
- function* clicked() {}
65
-
66
- return initial;
+ function* initial() {
+ yield on("click", clicked);
+ yield listenTo(button, "click");
67
}
+ function* clicked() {}
+
+ return initial;
+}
68
69
const button = document.createElement('button');
70
const machine = start(ButtonClickListener.bind(null, button));
0 commit comments