Feedback for react/review-using-props-with-stateless-functional-components

Maybe I am missing something, can anyone please explain?

What’s the point of making same property in props required and declaring default value for this property at the same time? If it is required then it will always be passed and default value will never be used, right?

PropTypes is a way to document your code. You could set a default parameter, but that doesn’t tell other people reading your code (including yourself after you’ve been away long enough to forget) that this parameter is absolutely required for the component to run.

1 Like

Thanks for explanation! This actually makes sense.