Skip to content

fix/useAync-demo 🧊 Fixed useAsync demo skeleton not proper rendering#446

Open
forckes wants to merge 1 commit intosiberiacancode:mainfrom
forckes:fix/useAync-demo
Open

fix/useAync-demo 🧊 Fixed useAsync demo skeleton not proper rendering#446
forckes wants to merge 1 commit intosiberiacancode:mainfrom
forckes:fix/useAync-demo

Conversation

@forckes
Copy link
Contributor

@forckes forckes commented Mar 5, 2026

The previous useAsync demo skeleton render condition was:

getPokemonQuery.data && !getPokemonQuery.isLoading &&

which is litterly mean to show loading skeleton when data is not loading.


Solution in this pull request is fixes this and renders loading skeleton on every data request.

Alternatively we can use this code to render skeleton only ones for data's first fetch:

{!getPokemonQuery.data && getPokemonQuery.isLoading && (
        {/* LOADING SKELETON */}
      )}

      {getPokemonQuery.data && (
       {/* DATA */}
      )}

Fixes #445

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.

[bug] useAsync demo skeleton dont load properly

1 participant