Skip to content

Instantly share code, notes, and snippets.

@redgeoff
Last active November 4, 2018 04:23
Show Gist options
  • Save redgeoff/4f06d73b32699434e796c62ab11b6fe4 to your computer and use it in GitHub Desktop.
Save redgeoff/4f06d73b32699434e796c62ab11b6fe4 to your computer and use it in GitHub Desktop.
MSON Talk: Model Component
import Component from 'mson/lib/component';
class MyComponent extends Component {
_className = 'MyComponent';
_create(props) {
super._create(props);
this.set({
schema: {
component: 'Form',
fields: [
{ name: 'firstName', component: 'TextField', help: 'First Name' },
{ name: 'lastName', component: 'TextField', help: 'Last Name' }
]
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment