stateless functional components
-
[movie_app_5] stateless functional components프로젝트/[react]movie_app 2018. 4. 3. 17:32
모든 컴포넌트에 state가 있는게 아니다! -반대로, state가 있는 컴포넌트는 smart component 라고 함 smart component dumb component state props class functional render(), lifecycleo x class MoviePoster extends Component{ render(){ return( ) }} ↓ function MoviePoster({poster}){ return ( )} class -> funtionrender()가 사라짐props로 받아옴 MoviePoster.propTypes = { poster: PropTypes.string.isRequired} class Movie extends Component{ static ..