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:

参考链接

You Might Also Like
发表评论

%d 博主赞过: