liztownd/graphql-swapp

Duplicated interface IHeaderProps

Opened this issue · 0 comments

IHeaderProps appears here:

const headerProps = {

But is more accurately defined within the component itself:

interface Props {
    title: string
    subtitle: string
}

A better pattern of development that would avoid this duplication would be to export Props from the component, then adjust the import in App.tsx to:

import Header, { Props as HeaderProps } from './Components/Header'