문서참고 : https://firebase.google.com/docs/database/web/read-and-write?authuser=0&hl=ko
removeCard()
- 삭제되는 정보는 어디에 있나? CardAddForm에서 입력된 정보
: 새로고침 시 동기화 처리(with firebase)
참고 : https://firebase.google.com/docs/database/web/read-and-write?authuser=0&hl=ko
GitHub에 commit을 하기 전 꼭 소스리뷰하기
나의 소스에 대해서 아는 것 필요, 더 보완할 부분은 없는지 확인하기
//리얼타임 데이터베이스에서 읽어오기 useEffect
useEffect(()=>{
//userId 없을 때는 그냥 끝.
if(!userId){
return;
}
//userId 있을 때는 카드 값 가져온 뒤 off까지 처리를 하게 됨!!이것이 후처리!!
const stopSync=cardLogic.syncCards(userId,cards =>{
setCards(cards)
});
return()=>stopSync();
},[userId, cardLogic]);
관련해서 프로젝트에서 NoSQL 활용해보고자 함.
상상 : 이용자 페이지에서 유저 메모 기능, 그룹웨어에서 당사자 상담시 임시 저장해두는 포스트잇 식 메모지 등