Last active
April 11, 2022 09:13
-
-
Save xiaojundebug/e7a996019c3a16f26589a401109390a0 to your computer and use it in GitHub Desktop.
Revisions
-
xiaojundebug revised this gist
Apr 11, 2022 . 1 changed file with 0 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -50,8 +50,3 @@ const machine = Machine({ } } }); -
xiaojundebug revised this gist
Apr 11, 2022 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -54,5 +54,4 @@ const machine = Machine({ var service = interpret(machine) .onTransition(function (state) { console.log(state) }).start() -
xiaojundebug revised this gist
Apr 11, 2022 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -55,5 +55,4 @@ var service = interpret(machine) .onTransition(function (state) { console.log(state) })
-
xiaojundebug revised this gist
Apr 11, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -53,7 +53,7 @@ const machine = Machine({ var service = interpret(machine) .onTransition(function (state) { console.log(state) }) .start()
-
xiaojundebug revised this gist
Apr 11, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -53,7 +53,7 @@ const machine = Machine({ var service = interpret(machine) .onTransition(function (state) { // console.log(state) }) .start()
-
xiaojundebug revised this gist
Apr 11, 2022 . No changes.There are no files selected for viewing
-
xiaojundebug revised this gist
Apr 11, 2022 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ const adValid = (context, event) => { return !context.adSkipped }; const machine = Machine({ "initial": "空闲中", "context": { "adSkipped": true @@ -50,4 +50,10 @@ const adValid = (context, event) => { } } }); var service = interpret(machine) .onTransition(function (state) { console.log(state) }) .start()
-
xiaojundebug revised this gist
Apr 11, 2022 . 1 changed file with 7 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,12 +15,12 @@ const adValid = (context, event) => { }; const fetchMachine = Machine({ "initial": "空闲中", "context": { "adSkipped": true }, "states": { "空闲中": { "on": { "广告": "广告中", "直播": "直播中", @@ -29,11 +29,13 @@ const adValid = (context, event) => { "广告中": { "on": { "跳过": "直播中", "空闲": "空闲中", } }, "直播中": { "on": { "点播": "点播中", "空闲": "空闲中", } }, "点播中": { @@ -42,7 +44,8 @@ const adValid = (context, event) => { "target": "广告中", "cond": adValid }, "直播": "直播中", "空闲": "空闲中", } } } -
xiaojundebug revised this gist
Apr 11, 2022 . No changes.There are no files selected for viewing
-
xiaojundebug revised this gist
Apr 11, 2022 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,8 +10,15 @@ // - actions // - XState (all XState exports) const adValid = (context, event) => { return !context.adSkipped }; const fetchMachine = Machine({ "initial": "空闲", "context": { "adSkipped": true }, "states": { "空闲": { "on": { @@ -31,7 +38,10 @@ }, "点播中": { "on": { "广告": { "target": "广告中", "cond": adValid }, "直播": "直播中" } } -
xiaojundebug revised this gist
Apr 11, 2022 . No changes.There are no files selected for viewing
-
xiaojundebug revised this gist
Apr 11, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,6 +31,7 @@ }, "点播中": { "on": { "广告": "广告中", "直播": "直播中" } } -
xiaojundebug revised this gist
Apr 11, 2022 . No changes.There are no files selected for viewing
-
xiaojundebug revised this gist
Apr 11, 2022 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,8 @@ "states": { "空闲": { "on": { "广告": "广告中", "直播": "直播中", } }, "广告中": { -
xiaojundebug created this gist
Apr 11, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ // Available variables: // - Machine // - interpret // - assign // - send // - sendParent // - spawn // - raise // - actions // - XState (all XState exports) const fetchMachine = Machine({ "initial": "空闲", "states": { "空闲": { "on": { "广告": "广告中" } }, "广告中": { "on": { "跳过": "直播中", } }, "直播中": { "on": { "点播": "点播中" } }, "点播中": { "on": { "直播": "直播中" } } } });