-
When I use dep version: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Why would a page need to have that prop type built in? Are you trying to do something like this? // pages/another-page.tsx
import MyPage from './pages/my-page'
const AnotherPage = ()=> <MyPage><div>Injecting content</div></MyPage>
export default AnotherPage; While that's technically possible, it seems prone to grow in complexity. A Why not remove the The docs document a case that resembles my assumption, https://nextjs.org/docs/basic-features/layouts#with-typescript. |
Beta Was this translation helpful? Give feedback.
Why would a page need to have that prop type built in?
Are you trying to do something like this?
While that's technically possible, it seems prone to grow in complexity.
A
NextPage
conceptually is a top level abstraction that represents an entire route/page, and it's not necessarily a React Component.Why not remove the
NextPage
type, and move that to be aLayout
Component, living for example incomponents/
, and then use it as such, a Layout component, across pages.The docs document a case that resembles my assumption, https:/…