react-lifecycle-hooks
react-lifecycle-hooks copied to clipboard
不支持React Hooks component
我的项目版本是React 16.7,所有Hooks component和函数式组件无法获取到,请问如何解决呢
Thanks for the issue.
It might not be related to version of react but the tool transforming jsx.
Take <div /> for example. Previously, it was transformed to React.createElement('div') but now it will be something like jsxRuntime.jsx('div').
I remember it was mentioned in the previous change log of react (or CRA?) that the way jsx being transformed will change. But I do not have a plan on updating this project to catch up with the latest change yet. So I'd suggest you to downgrade your build tools (babel react, I suspect) (but I do not recommend this way) or look up for other tools.
Good luck :)
不好意思,习惯性地回复了英文。如果还有问题我们可以中文聊。