diff --git a/docs/api-reference/data-fetching/getInitialProps.md b/docs/api-reference/data-fetching/getInitialProps.md index e405a41efa11e..b20a2ab9f4f20 100644 --- a/docs/api-reference/data-fetching/getInitialProps.md +++ b/docs/api-reference/data-fetching/getInitialProps.md @@ -85,7 +85,7 @@ For the initial page load, `getInitialProps` will execute on the server only. `g ## TypeScript -If you're using TypeScript, you can use the `NextPage` type for functional components: +If you're using TypeScript, you can use the `NextPage` type for function components: ```jsx import { NextPage } from 'next' diff --git a/examples/with-electron-typescript/renderer/pages/initial-props.tsx b/examples/with-electron-typescript/renderer/pages/initial-props.tsx index db0baf7a3e908..2ab813fd38fbf 100644 --- a/examples/with-electron-typescript/renderer/pages/initial-props.tsx +++ b/examples/with-electron-typescript/renderer/pages/initial-props.tsx @@ -11,7 +11,7 @@ type Props = { } const WithInitialProps: NextPage = ({ items, pathname }) => ( - +

List Example (as Function Component)

You are currently on: {pathname}

diff --git a/test/integration/link-ref/pages/functional.js b/test/integration/link-ref/pages/function.js similarity index 100% rename from test/integration/link-ref/pages/functional.js rename to test/integration/link-ref/pages/function.js diff --git a/test/integration/link-ref/test/index.test.js b/test/integration/link-ref/test/index.test.js index cab64da4cafc8..70c556a0cce39 100644 --- a/test/integration/link-ref/test/index.test.js +++ b/test/integration/link-ref/test/index.test.js @@ -57,8 +57,8 @@ describe('Invalid hrefs', () => { }) afterAll(() => killApp(app)) - it('should not show error for functional component with forwardRef', async () => { - await noError('/functional') + it('should not show error for function component with forwardRef', async () => { + await noError('/function') }) it('should not show error for class component as child of next/link', async () => { @@ -83,7 +83,7 @@ describe('Invalid hrefs', () => { afterAll(() => killApp(app)) it('should preload with forwardRef', async () => { - await didPrefetch('/functional') + await didPrefetch('/function') }) it('should preload with child ref with React.createRef', async () => {