Skip to content

Using Form.js and Error.js with react #22

@ajsheldon93

Description

@ajsheldon93

Hey @JeffreyWay

I have utilized the Form and Error classes in Vue for a few years. They have been great assets to OOP my forms for ease of use and cleanliness of code. Thanks for building these simple classes.

I am doing a new project with React for the sake of trying to use and learn it. I am trying to use the same Form and Error classes. Most of it works except the error calls. When i add has() class in, it executes on load, but not once the errors are added when the form submits. I am doing this in the render function:
{this.state.form.errors.has('first_name') && this.state.form.errors.get('first_name')}

Any idea what is happening? It seems to not recheck the function.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions