Merged in chore/migrate-from-next-lint (pull request #3263)
chore: Migrate from next lint to eslint * Migrate scandic-web * Migrate partner-sas * Enable any rule in partner-sas Approved-by: Joakim Jäderberg Approved-by: Linus Flood
This commit is contained in:
@@ -10,6 +10,7 @@ import { cache as reactCache } from "react"
|
||||
*
|
||||
* @param fn - The function to memoize
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export function cache<T extends (...args: any[]) => any>(fn: T) {
|
||||
const cachedFunction = reactCache((stringifiedParams: string) => {
|
||||
return fn(...JSON.parse(stringifiedParams))
|
||||
|
||||
Reference in New Issue
Block a user