-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 #1674
base: master
Are you sure you want to change the base?
solution #1674
Conversation
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 #1 and #3 are not satisfied
src/App.tsx
Outdated
<div className="App"> | ||
<h1>Dynamic list of Goods</h1> | ||
export const App: React.FC = () => { | ||
const [preparedGoods, setPreparedGoods] = useState([] as Good[]); |
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.
const [preparedGoods, setPreparedGoods] = useState([] as Good[]); | |
const [preparedGoods, setPreparedGoods] = useState<Good[]>([]); |
src/App.tsx
Outdated
<button | ||
type="button" | ||
data-cy="all-button" | ||
onClick={() => getAll().then(setPreparedGoods)} |
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.
better to create separate functions
onClick={() => getAll().then(setPreparedGoods)} | |
onClick={onLoadAll} |
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.
Please check point 3 in checklist and try to handle request error
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.
Good work, approving:sparkles:
DEMO LINK