lab.naminsik
  • Javascript, jQuery
  • Reactjs
  • React Native
  • iOS
  • Android
  • AWS
  • Server
  • Html, CSS
  • Php
  • asp .net
  • SQL
  • Word Press
search
keywords
  • Reactjs 2020‧07‧15

    컴포넌트 안에서 method 호출 or arrow 함수 호출 (feat. this 이슈)

    예를 들어 클릭 이벤트에 state 의 값을 변경하려고 함수 호출하거나 메서드를 호출한다.ES6 문법의 arrow 함수 방식으로 호출할 경우는 증가 버튼을 클릭하면 onClick으로 handleInc 인 arrow 함수 호출하여 state 값을 변경하는 예제였다.이 것을 ES6 문법이 아닌 예전 방식으로 코딩하면 아래와 같다. constructor 안에서 이벤트 메서드를 this.handleInc = this.handleInc.bind(this); 이런식으로 this를 바인딩 해줘야한다.그렇지 않으면 number 가 undefined […]

  • Reactjs 2017‧05‧24

    props가 변경되어서 state를 업데이트(setState) 할 때

    자식 컴포넌트가 부모로 받은 props 의 값들이 변경되었다. 변경됨을 감지하고 자식 컴포넌트안의 state 값을 변경(setState)하여 자식 컴포넌트 안의 함수 실행 또는 변수 정의를 그에 맞게 재실행하고 할 때가 있다. componentDidUpdate(prevProps, prevState){ if (this.props.tagList !== prevProps.tagList) { console.log('업뎃?') this.setState({ ...this.state, selectTagNum : -1 }) } } 이렇게 하면 props.tagList라는 값이 변경이 되었다면 this.state 안에 selectTagNum 은 […]

popular

  • 키보드 키 코드
  • 리눅스 tail 명령어 사용법
  • 카카오톡 간편 로그인 2.0 팝업창 띄웠을 때 부모창 overflow hidden 이슈
  • Github, AWS EC2, Next.js CI/CD 자동화 + Slack 연동
  • react native - No apps connected. Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB
  • 안드로이드 스튜디오로 만들 때 타이틀바 없애기
  • MSSQL - 두 테이블간 컬럼의 값들에 일치하는 항목 추출
  • CTO로 선임된 지 2년 6개월
  • 2012 웹어워드 컨퍼런스 선물
  • CodeDeploy agent was not able to receive the lifecycle event. Check the CodeDeploy agent logs on your host and make sure the agent is running and can connect to the CodeDeploy server.

comment

  • 감사합니다!
  • 감사합니다~
  • 잘 해결 되셨다니 다행입니다!...
  • 정말 감사합니다. 덕분에 해결했습니다!...
  • 유용한정보 대단히 감사합니다....