upgrade alova to v3

This commit is contained in:
proddy
2024-08-03 15:35:54 +02:00
parent 9a23d4e2b3
commit 7751baf8bf
33 changed files with 481 additions and 867 deletions

View File

@@ -8,8 +8,19 @@ export const ACCESS_TOKEN = 'access_token';
export const alovaInstance = createAlova({
statesHook: ReactHook,
timeout: 3000, // 3 seconds but throwing a timeout error
localCache: null,
cacheFor: null,
// TODO fix cache
// cacheFor: {
// // Set the cache mode for POST uniformly
// POST: {
// mode: 'restore',
// expire: 60 * 10 * 1000
// },
// // Set the cache mode for HEAD requests uniformly
// HEAD: 60 * 10 * 1000
// },
// timeout: 3000, // 3 seconds but throwing a timeout error
// localCache: null,
// localCache: {
// GET: {
// mode: 'placeholder', // see https://alova.js.org/learning/response-cache/#cache-replaceholder-mode