score:1

Accepted answer
import React from 'react';

interface Props {
  siteName: string;
  webUrl: string;
}

export const App: React.FC = () => {
  return <Copyright />; 
};

export const Copyright: React.FC<Props> = (props) => {
  return (
    <div>
      <p>{props.siteName}</p>
      <p>{props.webUrl}</p>
    </div>
  );
};

Copyright.defaultProps = {
  siteName: "myWeb",
  webUrl: "http://localhost:3000"
};

score:1


interface Props {
    siteName?: string
    webUrl?: string
}

export const Copyright: React.FC<Props> = (
  { siteName = 'myWeb', webUrl = 'http://localhost:3000' }
) => {
  return (
    <div>
      <p>{siteName}</p>
      <p>{webUrl}</p>
    </div>
  )
}

Related Query

More Query from same tag