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

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

Open
ajsheldon93 opened this issue Mar 18, 2020 · 0 comments
Open

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

ajsheldon93 opened this issue Mar 18, 2020 · 0 comments

Comments

@ajsheldon93
Copy link

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!

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