So what i want to do is to reset the username field's value to '' and focus it (upon i get an error sent back form the server).
// get the form ref
var form = this.refs.loginForm.getForm();
// reset username field value (this actually gets updated if i check
// it in the console but the UI won't re-render
form.updateData({username: ''}, {validate: false})
// focus the username input (ofc doesnt work at all)
form.fields.username.focus();
Does any of this have anything to do with React? Basically on page load check for some error that occurred, if that value is present than you would want to pass that value as a property to your react component to build your UI accordingly.
Sorry the question is kind of vague, there are a ton of ways you can handle it. Not really react specific since you said it comes back from the server I'm assuming the page reloads? or are you making an ajax call that is coming back to the server if that is the case, log the response as a variable in React's state and tell it what to do should that variable be present.