It sets error to true, which displays
error
if (error) { return <h2>Error fetching users</h2>; }
Are you sure? It looks like data would be falsy (if the fetch errors out!) and so your second if block can never run.
data
git clone the repo and look for yourself, if this is really an issue please add an issue to the repo or try to contribute to it 💜
git clone
issue
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It sets
error
to true, which displaysAre you sure? It looks like
data
would be falsy (if the fetch errors out!) and so your second if block can never run.git clone
the repo and look for yourself, if this is really an issue please add anissue
to the repo or try to contribute to it 💜