1import React from 'react';
2
3interface Props {
4}
5
6const App: React.FC<Props> = (props) => {
7 return (
8 <div><div/>
9 );
10};
11
12export default App;
1// Declare the type of the props
2type CarProps = {
3 name: string;
4 brand: string;
5 price;
6}
7
8// usage 1
9const Car: React.FC<CarProps> = (props) => {
10 const { name, brand, price } = props;
11 // some logic
12}
13
14// usage 2
15const Car: React.FC<CarProps> = ({ name, brand, price }) => {
16 // some logic
17}
18
19