Answers for "defaultprops functional component"

0

defaultprops functional component

const Component = ({ prop1, prop2 }) => (
  <div></div>
)

Component.defaultProps = {
  prop1: false,
  prop2: 'My Prop',
}
Posted by: Guest on July-25-2021

Code answers related to "defaultprops functional component"

Browse Popular Code Answers by Language