Skip to content

Instantly share code, notes, and snippets.

@bryceosterhaus
Last active July 26, 2016 17:33
Show Gist options
  • Select an option

  • Save bryceosterhaus/a6a0eab3884475365e374aa28cffddd5 to your computer and use it in GitHub Desktop.

Select an option

Save bryceosterhaus/a6a0eab3884475365e374aa28cffddd5 to your computer and use it in GitHub Desktop.
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