SHARE
TWEET

Untitled

a guest Sep 17th, 2019 183 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const wiseLoadingMachine = Machine({
  2.     id: 'wiseLoadingMachine',
  3.     initial: 'idle',
  4.     context: {
  5.       region: null
  6.     },
  7.     states: {
  8.       idle: {
  9.         on: {
  10.           setTab: 'settingTab'
  11.         }
  12.       },
  13.       settingTab: {
  14.         onEntry: 'setRegion'
  15.       },
  16.       loading: {
  17.         initial: 'loadingUISettings',
  18.         on: {
  19.           setTab: '#wiseLoadingMachine.settingTab'
  20.         },
  21.         states: {
  22.           loadingUISettings: {
  23.             invoke: {
  24.               src: 'loadUISettings',
  25.               onDone: 'loadingSubmittedSpend'
  26.             },
  27.           },
  28.           loadingSubmittedSpend: {
  29.             invoke: {
  30.               src: 'loadSubmittedSpend',
  31.               onDone: '#wiseLoadingMachine.success'
  32.             },
  33.           }
  34.         }
  35.       },
  36.       success: {
  37.         entry: 'setResult',
  38.         on: {
  39.           setTab: 'settingTab'
  40.         }
  41.       }
  42.     }
  43.   });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top