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

FormComponent should use defaultProps #297

Open
dcocchia opened this issue Dec 12, 2018 · 0 comments
Open

FormComponent should use defaultProps #297

dcocchia opened this issue Dec 12, 2018 · 0 comments

Comments

@dcocchia
Copy link
Member

If an id prop is not passed to the FormComponent component, it generates a unique id for labels lower down in the component tree. This is great in some ways, but it has a couple issues:

  • It's not clear in the documentation that this will happen, since it's not using defaultProps
  • This causes issues with snapshot tests for users of the library, since this data is randomized for each test run

Issue 1 has an obvious fix. Issue 2 could just be a requirement for users to supply an id prop during tests.

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