dillon1000/react

Commit

Clarify usage of `.propTypes` and `.defaultProps` when using stateless functional components

I've seen some people unaware about the fact that you can still specify `.propTypes` and `.defaultProps` when you are defining a functional component by setting them as properties of the function.
I thought clarifying this in the docs could help!
Browse files
Changed paths1 file
First-parent comparison
M docs/docs/05-reusable-components.md Modified
Patch

Files changed

Rendering syntax-highlighted changes…