stormpath-express-react-example
stormpath-express-react-example copied to clipboard
Doesn't support react-toolbox properly
I use the following as the contents of the LoginForm:
<Input type='text' value={this.state.username} name="username" id="username"
label='Email Address' hint='[email protected]' required
onChange={this.handleChange.bind(this, 'username')} icon='face'/>
<Input type='password' value={this.state.password} name="password" id="password"
label='Password' required
onChange={this.handleChange.bind(this, 'password')} icon='lock'/>
<p data-spIf="form.error">
<strong>Error:</strong><br />
<span data-spBind="form.errorMessage"/>
</p>
<Button type='submit' value="Login" icon='check'>Login</Button>
and it doesn't find the fields. It submits: { username: "", password: "" } to the local endpoint. I followed the comment in the documentation about type, onChange and name.