#9 Today I Learned - 21.01.15

@ye-r1·2021년 1월 15일
0

til

목록 보기
7/11
post-thumbnail

Today I Learned 📝

  • mini project : redux todo list
  • github : git push tutorial
  • es6 : filter()
  • javascript : json.stringify()


💻 ✏️ mini project : redux todo list

링크 🔗 - https://github.com/ye-r1/vanilla-redux


github : git push tutorial

    1. git init   git 저장소 생성
    1. git add *  git 저장소에 보낼 file 선택
    1. git commit -m ""  commit 메세지 작성
    1. git remote add origin "url"  원격 저장소 연결
    1. git push -u origin main  git 보내기
    1. 기존 데이터가 손실될 수 있어서 push를 막은 경우에는 강제 push를 진행한다. (git push -u origin +main)
  • git add *
  • git commit -m ""
  • git push

이후 커밋을 할 때에는 이 부분만 해줘도 된다.


es6 : filter()

javascript filter()

해당하는 값만 모아 새로운 배열로 생성한다.

const words = ['apple', 'pizza', 'candle', 'cup'];
const result = word.filter(word => word.length > 5);
  • filter는 새로운 array를 생성하고 새로 선언된 result 변수가 새로운 배열을 저장해준다.
  • new array를 생성한 후 return시켜서 words의 array를 수정하지 않는다.

javascript : json.stringify()

json을 문자열로 변환시켜준다.



review 📃

redux와 친해지는게 어렵다..
자주 반복해서 써보려 한다..ㅠㅠ

0개의 댓글