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

task solution #1763

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

task solution #1763

wants to merge 1 commit into from

Conversation

meljaszuk
Copy link

@meljaszuk meljaszuk closed this May 21, 2024
@meljaszuk meljaszuk reopened this May 21, 2024
Copy link

@BogdanMaliuta BogdanMaliuta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!
Next time try to use CN library in another way

data-cy="Good"
key={good}
className={
selectedGood === good ? 'has-background-success-light' : ''

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you dont need to pass empty className and use ternary,
you can do this like that, 'className': condition

</h1>
export const App: React.FC = () => {
const [selectedGood, setSelectedGoods] = useState<Good | null>('Jam');
const selectedHandler = (good: Good | null) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const selectedHandler = (good: Good | null) => {
const selectedGoodHandler = (good: Good | null) => {

better to understand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants