프로필사진
  • About
  • 태그
  • 방명록
  • RSS
  • JooStory.net
  • JooHana.net

개인적인 관심사에 관해서 이런저런 이야기를 하고 있습니다. #집밥 #개발자 #Ubuntu

검색하기 폼
  • 분류 전체보기 (608)
    • Dev (82)
    • 잡담 (103)
    • 집밥 (21)
    • 리뷰 (41)
  • 방명록

react-redux (1)
React Redux functional component 적용

React Hooks는 functional component를 사용할 수밖에 없다. 애초에 그러려고 만든 거니까. 그동안 redux와 react를 connect하기 위해서 hoc를 사용했는데 decorator를 사용했었다. import React, { Component } from 'react'; import { connect } from 'react-redux'; @connect(state => ({ name: state.name })) class MyComponent extends Component { render() { const { name } = this.props; return ( {name} ); } } export default MyComponent; 이 decorator는 class에만 ..

Dev 2019. 4. 18. 14:53
이전 1 다음
이전 다음
링크
  • JooStory.net
  • Github
  • Twitter
  • LinkedIn
최근에 올라온 글
TAG
  • 글꼴
  • ubuntu
  • Mac
  • 레시피
  • 티스토리
  • electron
  • 넷플릭스
  • 요리
  • Linux
  • Daum
more

Blog is powered by Tistory / Designed by Tistory

티스토리툴바