Skip to content

Commit 5db3c75

Browse files
committed
isPending for tanstack query
1 parent a4debf1 commit 5db3c75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hackathon/spacecraft/src/screens/StarshipFeedScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ const renderItem = (props: RenderItemProps) => {
2727
};
2828

2929
export const StarshipFeedScreen = () => {
30-
const { isLoading, isError, data, refetch } = useQuery({
30+
const { isPending, isError, data, refetch } = useQuery({
3131
queryKey: ["starships"],
3232
queryFn: fetchStarships,
3333
});
3434

35-
if (isLoading) {
35+
if (isPending) {
3636
return <ScreenContainer title="Loading…" />;
3737
}
3838

0 commit comments

Comments
 (0)