Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplest quickstart example error- Invariant Violation: RenderForm.render() #120

Open
iftheshoefritz opened this issue Nov 1, 2015 · 0 comments

Comments

@iftheshoefritz
Copy link

Based on (a copy/paste, really) the example at the top of the quickstart I have the following:

var SignupForm = forms.Form.extend({
  username: forms.CharField(),
  email: forms.EmailField(),
  password: forms.CharField({widget: forms.PasswordInput}),
  confirmPassword: forms.CharField({widget: forms.PasswordInput}),
  acceptTerms: forms.BooleanField({required: true})
});

var Signup = React.createClass({
  render: function() {
    return (
      <form>
        <forms.RenderForm form={SignupForm} ref="signupForm"/>
        <button>Sign Up</button>
      </form>
    );
  }
});

This fails with the following error in the chrome console:

Uncaught Error: Invariant Violation: RenderForm.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.

The problem seems to be in the <forms.RenderForm> line, if I remove that the error goes away, but of course I don't see my fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant