React.FC<인터페이스명>
interface BoardProps {
toggle : boolean
}
const Board: React.FC<BoardProps> = ({ toggle }) => {
return (<div></div>)
}
interface 이름 {
// (매개변수:타입):반환값
(test: string):void;
}
interface StateProps {
// props : 타입
test: string;
// setState : 리액트 형식
setTest: React.Dispatch<React.SetStateAction<string>>;
리액트의 props를 (props) 로 받아올때도 동일한 타입을 쓴다
interface FunProps {
// props : 타입
test: string;
// 함수명:(인자:타입) => 반환값
handleTest:(test:string) => void;