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

  • js - 채널톡 삽입(커스텀 버튼, 뱃지 카운트, 서포트봇 양식 연동)
  • 그림문자인 이모지(emoji) 웹에 사용하기
  • JS - datepicker(jQueryUI,달력) 이용시 두개 날짜 범위 설정
  • 게시판 플러그인 KBoard 설치법 및 사용법
  • nextjs, aws codebuild 오류 - Failed to compile. Module not found: Can't resolve ...
  • SQL - 데이터베이스 삭제
  • MOBIS Carfe Intro Movie
  • 라운드 버튼 만들기, shape solid 배경색 변경
  • gulp (4 버전이상) 설정 및 사용 (feat. sass,localhost)
  • node 버전 업 (nvm install) 이후, Command 'yarn' not found, but can be installed with 오류

comment

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