fecs-prefer-class对react有影响
otakustay opened this issue · comments
所有stateless component会报这个错
更新到最新版了吗?fecs@1.5.0-beta.4 就是专门为了解决这个问题的
就是beta.4的
~/Develop/scafold(develop*) » $(npm bin)/fecs -v otakustay@Reinforce
fecs 1.5.0-beta.4
------------------------------------------------------------
~/Develop/scafold(develop*) » $(npm bin)/fecs otakustay@Reinforce
fecs INFO src/common/components/Loading.js (1 message)
fecs ERROR → line 8, col 17: Expected `class Loading` but found `ArrowFunctionExpression`.
fecs INFO src/index/components/SideNavigator.js (2 messages)
fecs ERROR → line 10, col 18: Expected `class SideLink` but found `ArrowFunctionExpression`.
fecs ERROR → line 20, col 23: Expected `class SideNavigator` but found `ArrowFunctionExpression`.
fecs INFO Linter found 3 errors in 2 of 75 files.
fecs@1.5.0-beta.4: 1076.129ms
给我样例代码看看
请问此问题修复了吗? @chriswong 我这边复现,一下是示例代码截图:
@dongshihao 提供一下代码
react 16.x 支持了直接返回 string
,然后编译的时候转换为 TextNode 节点。