为什么所有“重新组合”食谱在不使用const { Component } = React;
时都以Component
开头?
这样开始食谱有什么意义?
https://github.com/acdlite/recompose/wiki/Recipes
最佳答案
这是因为在代码中使用了JSX。 JSX被编译为React.createElement,显然使用了React。
为什么所有“重新组合”食谱在不使用const { Component } = React;
时都以Component
开头?
这样开始食谱有什么意义?
https://github.com/acdlite/recompose/wiki/Recipes
最佳答案
这是因为在代码中使用了JSX。 JSX被编译为React.createElement,显然使用了React。