question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add or fix missing prop types for components

See original GitHub issue

While doing a propType audit of the codebase, I came across several components that were seemingly missing propTypes definitions or were written in a way such that they were not statically accessible for auditing. This issue is to address ones where they make sense, particularly for components that have no prop type information.

Missing prop types and should be added:

  • TableExpandHeader
  • TableToolbar
  • ~BreadcrumbSkeleton~
  • ~CheckboxSkeleton~
  • ~FileUploaderSkeleton~
  • ~ProgressIndicatorSkeleton~
  • RadioButtonSkeleton
  • ~TabsSkeleton~
  • ~TagSkeleton~

Missing propTypes due to how the component is exported (either IIFE or React.forwardRef):

  • IIFE
    • NumberInput has missing propTypes
    • OverflowMenu
    • RadioButton
    • Tooltip
  • React.forwardRef (is this possible to rewrite for class components?)
    • HeaderMenu
    • SideNavMenu

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
joshblackcommented, Oct 29, 2019

Thanks @jendowns! Just updated the list after your comment, seems like something was up with the collection script I wrote 🤔

Also thanks again for the PRs! Definitely agreed on the function components too btw, in general I hope we can start working towards that goal as a whole 👀

0reactions
emyarodcommented, Jun 10, 2020

aside from the DataTablePropTypes export is the original list still up to date?

Read more comments on GitHub >

github_iconTop Results From Across the Web

React eslint error missing in props validation - Stack Overflow
Select your Component's name · Press command + . (Windows is Ctrl + .) show Code Actions and select PropTypesGenerate, or press shift...
Read more >
How to Add React Component Prop Validation in Minutes
If you want to see what happens when React detects the wrong prop type being used, try using React.PropTypes.string in the snippet above....
Read more >
How to fix: Prop types validation error - is missing in props ...
To fix the 'React eslint error missing in props validation' when developing a React app, we can set the prop types of the...
Read more >
eslint-plugin-react/prop-types.md at master - GitHub
Disallow missing props validation in a React component definition ( react/prop-types ). This rule is enabled in the ☑️ recommended config.
Read more >
[React] Solution for 'children' is missing in props validation ...
If you came up with this error message “ 'children' is missing in props validation eslint(react/prop-types)” , this article might help.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found