-
Notifications
You must be signed in to change notification settings - Fork 11
chore:readability #18
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
base: main
Are you sure you want to change the base?
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.
Thanks for your pull request!
@@ -1,12 +1,11 @@ | |||
{ | |||
"name": "react-query-lite", | |||
"name": "build-your-own-tanstack-query", |
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.
Thanks for the suggestion!
I removed and reinstalled package-lock.json file on #22.
<span className="font-bold"> | ||
{(() => { | ||
if (isFetching) { | ||
return <span className="text-blue-500">fetching</span>; | ||
} | ||
|
||
if (!observers.length) { | ||
return <span className="text-gray-500">inactive</span>; | ||
} | ||
|
||
if (status === "success") { | ||
return <span className="text-green-500">success</span>; | ||
} | ||
|
||
if (status === "error") { | ||
return <span className="text-red-500">error</span>; | ||
} | ||
|
||
return null; | ||
})()} | ||
</span> |
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 think current the code is more intuitive, even though it uses IIFE.
So, for now, I'd prefer to keep it as it is.
No description provided.