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 […]

popular

  • nextjs, aws codebuild 오류 - Failed to compile. Module not found: Can't resolve ...
  • sublime text2 sftp 접속시 encoding error
  • php - 글자 수 가져오기 strlen
  • OMG 케릭터 아이폰 배경화면
  • YN0028: The lockfile would have been created by this install, which is explicitly forbidden.
  • react, vue - Uncaught SyntaxError: Unexpected token
  • 키보드 키 코드
  • `value` prop on `input` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.
  • 로고디자인 - 블랙과 화이트 색상을 이용한 심플한 로고 디자인 모음
  • 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

comment

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