From documentation:
Step 7
Go to the src/pages folder and create a new, standalone file with name of your component (for example MyComponent.tsx).
This does't work in App Router mode. The production build (npm run build) fails with error:
TypeError: Cannot read properties of undefined (reading 'forwardRef')
I think that correct place for the MyComponent.tsx is the src/components folder.
From documentation:
This does't work in App Router mode. The production build (
npm run build) fails with error:I think that correct place for the
MyComponent.tsxis the src/components folder.