-
Notifications
You must be signed in to change notification settings - Fork 14
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
Remove react fc + pnpm7 #815
Conversation
FC: 'See: https://fettblog.eu/typescript-react-why-i-dont-use-react-fc/', | ||
'React.FC': 'See: https://fettblog.eu/typescript-react-why-i-dont-use-react-fc/', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An interesting piece of code
@@ -18,7 +18,7 @@ | |||
"downlevelIteration": true, | |||
"noFallthroughCasesInSwitch": true, | |||
"types": ["node", "jest", "@testing-library/jest-dom"], | |||
"incremental": true, | |||
"incremental": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is set to true as it had false positive with typechecking.
|
||
const ProductTemplate: ProductTemplateStatic & React.FC<ProductTemplateProps> = (props) => ( | ||
<ProductTemplateComponent {...props} /> | ||
const ProductTemplate = ({ children, ...rest }: ProductTemplateProps) => ( | ||
<ProductTemplateComponent {...rest}>{children}</ProductTemplateComponent> | ||
); | ||
|
||
ProductTemplate.Card = ProductTemplateCard; | ||
|
||
export default ProductTemplate; | ||
export default Object.assign(ProductTemplate, { Card: ProductTemplateCard }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another interesting piece of code
38b22c0
to
7950e81
Compare
7950e81
to
ca9efee
Compare
✅ Deploy Preview for zrc ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR, ❤️ this, do you think it would be possible to break this down into smaller chunks for easier review?
I suppose its all pretty coupled, bar the pnpm one - which could belong in a pr of its own.
Yes, the namespace refactor is to avoid FC. Pnpm change is in a single commit and the eslint imports as well |
9693676
to
a13458e
Compare
🎉 This PR is included in version 5.33.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
React.FC
Fix #763