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

Add defaultProps and propTypes for each component #36

Closed
christopherhafke opened this issue Feb 4, 2020 · 1 comment · Fixed by #47
Closed

Add defaultProps and propTypes for each component #36

christopherhafke opened this issue Feb 4, 2020 · 1 comment · Fixed by #47
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@christopherhafke
Copy link
Collaborator

This will improve the type safety and usability of each of our components.

@christopherhafke christopherhafke added enhancement New feature or request good first issue Good for newcomers labels Feb 4, 2020
@alex-gedeon alex-gedeon self-assigned this Feb 21, 2020
@christopherhafke
Copy link
Collaborator Author

christopherhafke commented Feb 24, 2020

@alex-gedeon Maybe we can link this issue with #34. In principle, components should be able to mount without crashing in the unit tests without any explicitly declared props (this is a good test that the defaultProps are correct), so this may be a good time to add such renders without crashing unit tests (there may be some exceptions to this). This shouldn't be too much overhead for this patch, since the code will look the same for just about every component (see App.test.js for what these tests might look like).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants