Inflearn Community Q&A
_app.js에서
Written on
·
255
0
const App = ({ Component }) => {
return (
<>
<Component />
</>
)
};
여기서 ({ Component }) 이 부분의 {} 는 어떤 역할인지 잘 모르겠어요..
{} 는 왜 넣어주는 거죠??
Next.jsnodejsexpressreduxreact
Answer 1
0
zerocho
Instructor
리액트에서 (props) 자리입니다. props를 구조분해 할당하면 ({ Component }) 로 쓸 수 있습니다. Component = props.Component 입니다.




