Realtime Database 에 like 폴더 is not created.
작성한 코드 및 에러 메세지
[Unhandled promise rejection: ReferenceError: Can't find variable: user_id]
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in asyncGeneratorStep
at node_modules\@babel\runtime\helpers\asyncToGenerator.js:null in _next
at node_modules\promise\setimmediate\core.js:null in tryCallOne
at node_modules\promise\setimmediate\core.js:null in setImmediate$argument_0
at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:null in _allocateCallback$argument_0
at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:null in _callTimer
at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:null in _callReactNativeMicrotasksPass
at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:null in callReactNativeMicrotasks
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:null in __callReactNativeMicrotasks
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:null in __guard$argument_0
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:null in __guard
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:null in flushedQueue
Object {
"key": "DetailPage-Bk0_I3Kz4sfVvegqoTOKK",
"name": "DetailPage",
"params": Object {
"idx": 0,
},
"path": undefined,
}
Object {
"key": "DetailPage-Bk0_I3Kz4sfVvegqoTOKK",
"name": "DetailPage",
"params": Object {
"idx": 0,
},
"path": undefined,
}
Ans) 아래와 같이 user_id가 아닌 userUniqueId 로 수정 후 실행 해보시겠어요?
firebase_db.ref('/like/'+userUniqueId+'/'+ tip.idx).set(tip,function(error){
console.log(error)
Alert.alert("찜 완료!")
});
'기술' 카테고리의 다른 글
Pandas (11/6) (0) | 2022.11.06 |
---|---|
RealtimeDatabase 정보확인 (0) | 2022.11.05 |
엑스포 상태바 설치후 AVD 끊김 (0) | 2022.10.31 |
백틱 에러 (0) | 2022.10.31 |
AVD 에뮬레이터 먹통일때 해결 방법 (0) | 2022.10.29 |