Skip to content

Conversation

SalmanGits
Copy link

No description provided.

Copy link
Owner

@mugglim mugglim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SalmanGits

Thanks for your pull request!

@@ -1,12 +1,11 @@
{
"name": "react-query-lite",
"name": "build-your-own-tanstack-query",
Copy link
Owner

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.

Comment on lines -27 to -47
<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>
Copy link
Owner

@mugglim mugglim Jun 1, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants