Component should be written as a pure function (react/prefer-stateless-function)

The rule should warn for components that are defined as a class or with React.createClass but could be safely written as pure stateless functions.

This should be considered as a problem:

This should not be considered as a problem:

参考链接

发表评论

电子邮件地址不会被公开。 必填项已用*标注