본문 바로가기
매일 해내는 개발/Develog

리덕스 투두 수정 / 심화 프로젝트 진행

by 해야지 2022. 12. 23.
반응형
리덕스 투두 수정
수정사항
  //Todo1: 삭제하면 404에러 --> 갑자기 잘됨.. 뭘 수정했지..?
  //Todo2: 체크버튼 에러 --> 처음에 !todo.isDone값만 넘기는 걸로 수정했는데 __updateTodo에 id값까지 넣어줬어야 했음
  //Todo3: 수정 에러  --> 원래 todo의 데이터에 직접접근해서 수정했는데 서버를 꼈더니 read only 객체가 돼버렸음
  // 원래 updateTodo안에 payload로 id: param.id, modifiedtitle, modifiedcontents로 넣었는데
  // 서버에서 기존 데이터에 modifiedTitle, modifiedContents 데이터가 붙어서 들어감
  // 그래서 id: parma.id, title: modifiedTitme, contents:midifiedContents로 수정했더니 됐음
  //Todo4: 스타일드 컴포넌트로 수정
  //Todo5: 최적화(useMemo)
  //Todo6: 삭제할 때 window.confirm

 

문제점 훅을 사용못하고있음..!

리액트 훅 useMemo, useState 쓰고싶은데 이런 오류가 계속남 조건문 때문인 줄 알고 버튼컴포넌트 실습을 해봤는데 안됨..!

 

 

---------

심화프로젝트

파이어베이스로 로그인 기능 구현 진행중

문제점: 회원가입/로그인 왔다갔다할때 input창에 데이터가 안사라지는 문제

해결못함

내일 할 일: 파이어베이스 데이터 가져와서 쓰는 방법, Material UI 라이브러리 사용방법

오늘 배운점:  auth에서 제공하는 에러코드로 유효성 검사가 가능하다

https://firebase.google.com/docs/auth/admin/errors

 

관리자 인증 API 오류  |  Firebase

Google은 흑인 공동체를 위한 인종적 평등을 추구하기 위해 노력하고 있습니다. 자세히 알아보기 이 페이지는 Cloud Translation API를 통해 번역되었습니다. Switch to English 의견 보내기 관리자 인증 API

firebase.google.com

스타일드 컴포넌트에도 props를 통해 조건을 줄 수 있따.
https://velog.io/@rjsdnql123/TILreact-styled-component%EB%A5%BC-%ED%99%9C%EC%9A%A9%ED%95%B4-%EB%B0%98%EC%9D%91%ED%98%95-%EC%9B%B9%EC%82%AC%EC%9D%B4%ED%8A%B8-%EB%A7%8C%EB%93%A4%EA%B8%B0-4-styled-components-%EB%A1%9C-props%EC%A0%84%EB%8B%AC%ED%95%98%EA%B8%B0

 

[TIL]react, styled-component를 활용해 반응형 웹사이트 만들기 -4 styled-components 로 props전달하기

ㅁㄴ

velog.io

3. git checkout 대신 switch를 쓸 수 있다..!

https://blog.outsider.ne.kr/1505

 

새 버전에 맞게 git checkout 대신 switch/restore 사용하기 :: Outsider's Dev Story

Git에 어느 정도 익숙하기에 새로운 기능이 나와도 일일이 테스트해보거나 자세히 확인해 보지 않았다. 얼마 전에 [Git 2.23](https://github.blog/2019-08-16-highlights-from-git-2-23/)에서 `checkout`을 대신...

blog.outsider.ne.kr

4. 리액트 훅은 조건문과 같이 쓸 수 없다? => 이건 자세히 모르겠음

https://stackoverflow.com/questions/70702617/error-react-hook-usecallback-is-called-conditionally-react-hooks-must-be-cal

 

Error: React Hook "useCallback" is called conditionally. React Hooks must be called in the exact same order in every component r

Getting a build error usecallback hook called conditinally. if i dont use useCallback i get the error JSX props should not use arrow functions const LinkComp = <T extends {}>(props: LinkPr...

stackoverflow.com

https://stackoverflow.com/questions/66275304/is-it-possible-to-use-usememo-hook-inside-contitional-statement

 

is it possible to use useMemo hook inside contitional statement?

I was trying to use react hooks inside conditional statement unfortunatly react gives you error for almost all the hooks and its intented as per hooks philosophy. and then I tried useMemo hook inside

stackoverflow.com

 

파이어베이스로 로그인 구현한거 정리할 것!

반응형

댓글