-
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
react-week2 assignment #22
base: main
Are you sure you want to change the base?
react-week2 assignment #22
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.
Check the assignment rules - I believe the fake data directory should no longer be here?
return response.json(); | ||
}) | ||
.then((data) => { | ||
setLoading(false); |
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.
I don't see the loading set to true
anywhere?
<div className="app"> | ||
<Header category={category} setCategory={setCategory} /> | ||
{loading ? ( | ||
<div>Loading...</div> |
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.
I'm not sure this will show, due to my comment 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.
the loading message ("Loading...") will be displayed when the loading state is true. The loading state is initially set to true, and it's only set to false after the successful completion of the API call.
No description provided.