Last active
October 30, 2016 16:04
-
-
Save mkozhukharenko/c3e1162ded9a2a05fd88e7b9c8cc4eab to your computer and use it in GitHub Desktop.
Login Form model
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 { 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