Props and PropTypes in React
React encourages developers to build by breaking a UI up into components. This means there will always be a need to pass data from one component to another — more specifically, from parent to child component — since we’re stitching them together and they rely on one another.
React calls the data passed between components props and we’re going to look into those in great detail. And, since we’re talking about props, any post on the topic would be incomplete without looking at PropTypes because they ensure that components are passing the right data needed for the job.
With that, let’s unpack these essential but loaded terms together.
Props: The data being passed around
Basically, props are what make React the tool that it is. React was designed to break things down into pie...