diff --git a/examples/with-electron-typescript/renderer/components/Layout.tsx b/examples/with-electron-typescript/renderer/components/Layout.tsx index b55cbb6afce054..a757f02c902080 100644 --- a/examples/with-electron-typescript/renderer/components/Layout.tsx +++ b/examples/with-electron-typescript/renderer/components/Layout.tsx @@ -1,15 +1,13 @@ -import * as React from 'react' +import React, { ReactNode } from 'react' import Link from 'next/link' import Head from 'next/head' type Props = { + children: ReactNode title?: string } -const Layout: React.FunctionComponent = ({ - children, - title = 'This is the default title', -}) => ( +const Layout = ({ children, title = 'This is the default title' }: Props) => (
{title} diff --git a/examples/with-electron-typescript/renderer/components/List.tsx b/examples/with-electron-typescript/renderer/components/List.tsx index 83183e7ba0a9a3..bdf2a81263447f 100644 --- a/examples/with-electron-typescript/renderer/components/List.tsx +++ b/examples/with-electron-typescript/renderer/components/List.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import React from 'react' import ListItem from './ListItem' import { User } from '../interfaces' @@ -6,7 +6,7 @@ type Props = { items: User[] } -const List: React.FunctionComponent = ({ items }) => ( +const List = ({ items }: Props) => (