Skip to content

Commit

Permalink
Eliminate revalidation cache on focus to enhance the fluidity of opti…
Browse files Browse the repository at this point in the history
…mistic updates
  • Loading branch information
deepsingh132 committed Dec 5, 2023
1 parent b485279 commit cfa70af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/Feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function Feed({ type }) {
const key = type ? `${backendUrl}/posts?type=${type}` : `${backendUrl}/posts`;
const { data, error, isLoading, mutate } = useSWR(key, fetcher, {
// refreshInterval: 30000,
revalidateOnFocus: true,
revalidateOnFocus: false,
revalidateOnReconnect: true,
refreshWhenOffline: true,
});
Expand Down

0 comments on commit cfa70af

Please sign in to comment.