File tree Expand file tree Collapse file tree 3 files changed +16
-16
lines changed Expand file tree Collapse file tree 3 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export default class QuickstartButtonFinal extends Component {
6262 states : {
6363 idle : {
6464 on : {
65- CLICK : {
65+ SUBMIT : {
6666 target : 'busy' ,
6767 cond : 'isEnabled' ,
6868 } ,
@@ -78,7 +78,7 @@ export default class QuickstartButtonFinal extends Component {
7878 success : {
7979 entry : [ 'handleSuccess' ] ,
8080 on : {
81- CLICK : {
81+ SUBMIT : {
8282 target : 'busy' ,
8383 cond : 'isEnabled' ,
8484 } ,
@@ -87,7 +87,7 @@ export default class QuickstartButtonFinal extends Component {
8787 error : {
8888 entry : [ 'handleError' ] ,
8989 on : {
90- CLICK : {
90+ SUBMIT : {
9191 target : 'busy' ,
9292 cond : 'isEnabled' ,
9393 } ,
@@ -100,7 +100,7 @@ export default class QuickstartButtonFinal extends Component {
100100 {
101101 actions : {
102102 handleSubmit ( context ) {
103- context . handleClickTask . perform ( ) ;
103+ context . handleSubmitTask . perform ( ) ;
104104 } ,
105105 handleSuccess ( context ) {
106106 context . onSuccess ( ) ;
@@ -126,11 +126,11 @@ export default class QuickstartButtonFinal extends Component {
126126 this . statechart . send ( 'ERROR' , { error : e } ) ;
127127 }
128128 } )
129- handleClickTask ;
129+ handleSubmitTask ;
130130
131131 @action
132132 handleClick ( ) {
133- this . statechart . send ( 'CLICK ' ) ;
133+ this . statechart . send ( 'SUBMIT ' ) ;
134134 }
135135
136136 @action
Original file line number Diff line number Diff line change @@ -32,11 +32,11 @@ export default class QuickstartButton extends Component {
3232 states : {
3333 idle : {
3434 on : {
35- CLICK : 'busy' ,
35+ SUBMIT : 'busy' ,
3636 } ,
3737 } ,
3838 busy : {
39- entry : [ 'handleClick ' ] ,
39+ entry : [ 'handleSubmit ' ] ,
4040 on : {
4141 SUCCESS : 'success' ,
4242 ERROR : 'error' ,
@@ -45,21 +45,21 @@ export default class QuickstartButton extends Component {
4545 success : {
4646 entry : [ 'handleSuccess' ] ,
4747 on : {
48- CLICK : 'busy' ,
48+ SUBMIT : 'busy' ,
4949 } ,
5050 } ,
5151 error : {
5252 entry : [ 'handleError' ] ,
5353 on : {
54- CLICK : 'busy' ,
54+ SUBMIT : 'busy' ,
5555 } ,
5656 } ,
5757 } ,
5858 } ,
5959 {
6060 actions : {
61- handleClick ( context ) {
62- context . handleClickTask . perform ( ) ;
61+ handleSubmit ( context ) {
62+ context . handleSubmitTask . perform ( ) ;
6363 } ,
6464 handleSuccess ( context ) {
6565 context . onSuccess ( ) ;
@@ -80,11 +80,11 @@ export default class QuickstartButton extends Component {
8080 this . statechart . send ( 'ERROR' , { error : e } ) ;
8181 }
8282 } )
83- handleClickTask ;
83+ handleSubmitTask ;
8484
8585 @action
8686 handleClick ( ) {
87- this . statechart . send ( 'CLICK ' ) ;
87+ this . statechart . send ( 'SUBMIT ' ) ;
8888 }
8989}
9090// END-SNIPPET
Original file line number Diff line number Diff line change @@ -86,10 +86,10 @@ about how your application behaves based on a visual language that everyone unde
8686
8787## Powered by xstate
8888
89- ` ember-statecharts ` provides a small Ember.js specific wrapper around the fabolous
89+ ` ember-statecharts ` provides a small Ember.js specific wrapper around the fabulous
9090and widely-used [ xstate] ( https://xstate.js.org/docs/ ) -library. All of the powerful
9191features of ` xstate ` are supported. The purpose of ` ember-statecharts ` is to
92- make it easy to use ` xsstate ` in an Ember.js application without having
92+ make it easy to use ` xstate ` in an Ember.js application without having
9393to write the same boilerplate code over and over again.
9494
9595## ember-statecharts vs. ember-concurrency
You can’t perform that action at this time.
0 commit comments