-
Notifications
You must be signed in to change notification settings - Fork 2
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
Refactor: PR #1 feedback #4
Conversation
export const progressivelyEnhance = function<Props>(ComposedComponent: React.ComponentType<Props>) { | ||
export const progressivelyEnhance = <Props extends {}>( | ||
ComposedComponent: React.ComponentType<Props>, | ||
) => { |
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.
To use generics with arrow functions in .tsx
files, we have to do make the generic extend another type. This is so that TypeScript knows it's looking at a generic and not a JSX tag. Otherwise, the syntax will be ambiguous to the compiler 😕
.vscode | ||
.github | ||
.editorconfig | ||
.prettierrc |
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.
Instead of .npmignore
you can specify a files
whitelist inside package.json
. Depends what you prefer!
@@ -6,16 +6,14 @@ indent_size = 2 | |||
trim_trailing_whitespace = true |
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.
Maybe a comment at the top to say that Prettier will inherit from here? E.g. https://github.com/unsplash/web-ops/blob/7352b543ae110247b005cb60226c6adf213401b1/.editorconfig#L1
Overview