Answers for "index.js:1 Warning: Failed prop type: The prop `expandableRows` is marked as required in `<<anonymous>>`"

0

index.js:1 Warning: Failed prop type: The prop `expandableRows` is marked as required in `<<anonymous>>`

// You explicitly use propTypes and even use isRequired, which is exactly what it sounds like.
Login.propTypes = {
  propName: PropTypes.func.isRequired
};

// But in your Page component, you don't provide a prop name `propName`. You just have it as this:
<Login />

// If `propName` is fundamentally needed for that component to work, you need to pass it in.
<Login propName={() => myFunction()} />

// In my case a `propName` that was fundamentally needed for a third party component to work was missing. I needed to pass it in, instead of null or undefined
Posted by: Guest on August-25-2020

Code answers related to "index.js:1 Warning: Failed prop type: The prop `expandableRows` is marked as required in `<<anonymous>>`"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language