How to write propsType and defaultProps of react pure components

react is 15.3

import React, { Component, PropTypes} from "react"


const FormTableLayout = (props) =>{

  return (
    <div className="farm-card">
    </div>
  )
}

// 
FormTableLayout.PropTypes = {
  title:PropTypes.string,
  returnBtn:PropTypes.bool,
}
Apr.01,2021

mistake PropTypes should be lowercase


where do you see it doesn't work?
you did not pass in any parameters.
when introducing a component, pass the wrong type of parameter to see if the browser has thrown an exception.

  

defaultProps can be written by the default parameter of props (props = defaultProps) = > {}

Menu