-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: add error-boundary & error-indicator components #16
Conversation
@@ -3,10 +3,10 @@ import 'styles/partnersLogo.css'; | |||
|
|||
export const PartnersLogo: React.FC = memo(() => { | |||
return ( | |||
<div className="partners-logo"> |
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.
do you need this changes?
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.
Probably not, but following the "react" best practice, empty tags should be self-closing. Also, I have deleted unnecessary spaces at the end of the string.
hasError: boolean; | ||
} | ||
|
||
export default class ErrorBoundry extends React.Component<{}, ErrorBoundryState> { |
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.
don't use default export.
We don't have code style guide for now and strict rules for that,
but let's do now simple as possible :)
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.
Removed defaults exports from ErrorBoundry and ErrorIndicator components
@@ -25,3 +24,5 @@ export default class ErrorBoundry extends React.Component<{}, ErrorBoundryState> | |||
return this.props.children; | |||
} | |||
} | |||
|
|||
export { ErrorBoundry }; |
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.
should be export class ErrorBoundry extends React.Component<{}, ErrorBoundryState> {
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.
Fixed
import ErrorBoundry from './error-boundry'; | ||
|
||
export {ErrorBoundry}; | ||
export {ErrorBoundry} from './error-boundry'; |
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.
export * from './error-boundry'
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.
Fixed
import ErrorIndicator from './error-indicator'; | ||
|
||
export {ErrorIndicator}; | ||
export { ErrorIndicator } from './error-indicator'; |
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.
the same as above
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.
Fixed
@@ -0,0 +1,26 @@ | |||
import * as React from 'react'; |
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.
typo, rename component to error-boundary
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.
Fixed
Error handler for "hard errors"
##Includes: