Last active
July 26, 2016 17:33
-
-
Save bryceosterhaus/a6a0eab3884475365e374aa28cffddd5 to your computer and use it in GitHub Desktop.
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 characters
| import Component, {Config} from 'metal-jsx'; | |
| class MyComponent extends Component { | |
| //... | |
| } | |
| MyComponent.STATE = { | |
| count: 5, | |
| loading: true | |
| // If not this then | |
| count: Config.value(5), | |
| loading: Config.value(true) | |
| }; | |
| const STORE = { | |
| creator: Config.instanceOf(Map).required | |
| }; | |
| MyComponent.PROPS = { | |
| ...STORE, | |
| id: Config.number.required | |
| items: Config.array.value([]) | |
| onChange: Config.func.required | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment