Files
accountbook/frontend/lib/swr-config.js
T

12 lines
273 B
JavaScript
Raw Normal View History

// 全局 SWR 配置
export const swrConfig = {
refreshInterval: 0, // 默认不自动刷新
revalidateOnFocus: true,
revalidateOnReconnect: true,
dedupingInterval: 2000,
errorRetryCount: 3,
onError: (error) => {
console.error('SWR Error:', error);
},
};