Component should be written as a pure functioneslintreact/prefer-stateless-fun error, has been resolved

Component should be written as a pure functioneslintreact/prefer-stateless-fun


solution:


Add state to the class component, then
constructor(props) { super(props) this.state = {} }


Guess you like

Origin blog.csdn.net/m0_46442996/article/details/109328762