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

solution #1766

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

solution #1766

wants to merge 1 commit into from

Conversation

Kozubowicz
Copy link

<main className="section container">
<h1 className="title">No goods selected</h1>
export const App: React.FC = () => {
const [selectedGood, setSelectedGood] = useState<string>('Jam');

Choose a reason for hiding this comment

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

is unnecessary because TypeScript can automatically infer type from initial value ;)

data-cy="ClearButton"
type="button"
className="delete ml-3"
onClick={() => setSelectedGood('')}

Choose a reason for hiding this comment

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

checklist: Create separate methods instead of creating inline event handlers (if we do so - we don't create new arrow function after component re-rendering)

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