Describe the bug
In React 19, the cache function has been moved from the main 'react' package to 'react/cache'. The current code imports cache from 'react', which will cause a runtime error.
Files affected
apps/web/app/ai-home-data.ts (line 2)
apps/web/app/analyze/(org)/[owner]/fetchOwner.tsx (line 4)
To Reproduce
Run the application with React 19 - the import will fail at runtime because cache is not exported from 'react' anymore.
Expected behavior
Import cache from 'react/cache' instead of 'react'.
Fix
Change:
import { cache } from 'react';
To:
import { cache } from 'react/cache';
Environment
- React: 19.2.4
- Next.js: (current version)
Additional context
This is a breaking change in React 19. See React 19 documentation for more details.
Describe the bug
In React 19, the
cachefunction has been moved from the main 'react' package to 'react/cache'. The current code importscachefrom 'react', which will cause a runtime error.Files affected
apps/web/app/ai-home-data.ts(line 2)apps/web/app/analyze/(org)/[owner]/fetchOwner.tsx(line 4)To Reproduce
Run the application with React 19 - the import will fail at runtime because
cacheis not exported from 'react' anymore.Expected behavior
Import
cachefrom 'react/cache' instead of 'react'.Fix
Change:
To:
Environment
Additional context
This is a breaking change in React 19. See React 19 documentation for more details.