Check out example codes for "index.js:1 Warning: Failed prop type: The prop `expandableRows` is marked as required in `<<anonymous>>`". It will help you in understanding the concepts better.

Code Example 1

// 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

Learn ReactJs, React Native from akashmittal.com