Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React.FC 不再推荐使用 #9

Open
nmsn opened this issue May 30, 2022 · 0 comments
Open

React.FC 不再推荐使用 #9

nmsn opened this issue May 30, 2022 · 0 comments
Labels

Comments

@nmsn
Copy link
Owner

nmsn commented May 30, 2022

issue 地址:facebook/create-react-app#8177

  1. React.FC 默认附带 children 隐式定义,有时候根本用不上
  2. 泛型支持不足
  3. 复合类型可读性差
  4. 组件的 defaultProps 定义和 React.FC 有冲突
  5. 要写的代码更长
@nmsn nmsn added the React label May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant