-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Develop #1768
base: master
Are you sure you want to change the base?
Develop #1768
Conversation
src/App.tsx
Outdated
|
||
render() { | ||
const title = | ||
this.state.selectedGood === '' ? ( |
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.
destructure state so you don't need to repeat this.state every time ;)
src/App.tsx
Outdated
className={ | ||
this.state.selectedGood === good | ||
? 'has-background-success-light' | ||
: '' | ||
} |
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.
use classnames library to improve readability of conditional classes
src/App.tsx
Outdated
data-cy="RemoveButton" | ||
type="button" | ||
className="button is-info" | ||
onClick={() => this.deleteGood()} |
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.
checklist: If your method don't get any argument, you don't need to create new arrow function. Just pass your method.
src/App.tsx
Outdated
|
||
|
||
|
||
<tr data-cy="Good" className="has-background-success-light"> |
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.
delete all comments
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 work 🔥
[DEMO LINK] https://keex1k.github.io/react_goods-selector/