Last active
November 11, 2019 16:33
-
-
Save chengsokdara/85859717b476d66ec7a5dfc75053d109 to your computer and use it in GitHub Desktop.
StoRa config sample
This file contains 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 characters
export default { | |
// This will be where you initialize your states | |
states: { | |
testScreen: { | |
testState: 'testState' | |
}, | |
demoScreen: { | |
demoState: 'demoState' | |
} | |
}, | |
// This will be where you initialize your actions | |
actions: { | |
testScreen: { | |
testAction: stora => { | |
console.log('stora', stora) | |
} | |
}, | |
demoScreen: { | |
demoAction: ({ states, actions }, demoBoolean) => { | |
console.log('states', states, 'actions', actions) | |
console.log('demoBoolean', demoBoolean) | |
} | |
} | |
}, | |
// If you need to do something before global state initialization | |
init: stora => { | |
console.log('stora', stora) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment