689 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			689 B
		
	
	
	
	
	
	
	
title
| title | 
|---|
| Review Using Props with Stateless Functional Components | 
Review Using Props with Stateless Functional Components
Hints
- A functional(a.k.a. stateless) component is just a plain javascript function which takes props as an argument and returns a react element.
- Use Component.defaultPropsto set default props.
- Use Component.propTypesto set props types.
Solution
const Camper = props => (<p>{props.name}</p>);
Camper.defaultProps = {
  name: 'CamperBot'
};
Camper.propTypes = {
  name: PropTypes.string.isRequired
};