Skip to content

Instantly share code, notes, and snippets.

@mkozhukharenko
Last active October 30, 2016 16:04
Show Gist options
  • Save mkozhukharenko/c3e1162ded9a2a05fd88e7b9c8cc4eab to your computer and use it in GitHub Desktop.
Save mkozhukharenko/c3e1162ded9a2a05fd88e7b9c8cc4eab to your computer and use it in GitHub Desktop.
Login Form model
import { observable } from 'mobx'
export default class LoginStore {
@observable
form = {
fields: {
email: {
value: '', // binds to input value
error: null // shows beneif the input
},
password: {
value: '',
error: null
}
},
meta: {
isValid: true,
error: null, // some generic error
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment