This commit is contained in:
cracklesparkle
2024-07-19 14:43:58 +09:00
parent a3043afa7b
commit 53e9a8cadf
25 changed files with 8 additions and 197 deletions

View File

@ -12,7 +12,7 @@ export function useDataFetching<T>(url: string, initData: T): T {
fetchData()
}, [url])
console.log(data)
// Memoize the data value
const memoizedData = useMemo<T>(() => data, [data])
return memoizedData