Skip to content

Commit

Permalink
fix: preload不使用useCallback进行缓存
Browse files Browse the repository at this point in the history
  • Loading branch information
m860 committed Jun 9, 2020
1 parent 451c27a commit d5e2d08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hooks/useCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function (cache: ?ICerberusCache): CerberusCacheResult {

const {download} = useUtils();

const preload = React.useCallback(async (options: PreloadOptions) => {
const preload = async (options: PreloadOptions) => {
const {
secret,
bundleCache,
Expand Down Expand Up @@ -107,7 +107,7 @@ export default function (cache: ?ICerberusCache): CerberusCacheResult {
}
}
}
}, []);
};

return {
cache: cacheInstance,
Expand Down

0 comments on commit d5e2d08

Please sign in to comment.