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
react2-week1/katayoun #294
base: main
Are you sure you want to change the base?
Conversation
<input | ||
type="text" | ||
placeholder="insert user" | ||
style={{ |
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.
Try to avoid using inline styles when possible. Instead, consider moving the styles to a CSS file.
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.
Hey @aina21
Yes, thank you.
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.
@aina21
Could you please tell me why I can't see the search results? I get no error. I tried to see what I would get in fetch using console.log(data), and then I could see the items. Therefore I used data. items. However, I would get no search results in the browser. Could you please help me where the problem is? Thank you so much.
function UserSearchResult() { | ||
const { query, loading, error, searchResult } = useContext(userContext); | ||
|
||
return ( |
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.
Consider simplifying the conditional logic. You could use a helper function or separate the outputs using if conditions, like so:
if (loading) return <div className="loading">Loading...</div>;
…ion.jsx + installing and using useDebounce + making key correction <li key={result.id}>{result.login}</li>
No description provided.