質問編集履歴

2

誤字

2022/02/27 17:05

投稿

oipoioipoi
oipoioipoi

score11

test CHANGED
File without changes
test CHANGED
@@ -49,7 +49,8 @@
49
49
  const Test = () => {
50
50
  const onClickSelect = async () => {
51
51
  const docRef = doc(db, "users", "7hs6ApsWzOd6deqYGuNU");
52
- const docSnap = await getDo
52
+ const docSnap = await getDoc(docRef);
53
+ console.log(docSnap);
53
54
  };
54
55
 
55
56
  return (

1

コードの説明

2022/02/27 16:37

投稿

oipoioipoi
oipoioipoi

score11

test CHANGED
File without changes
test CHANGED
@@ -45,11 +45,11 @@
45
45
  import { getDoc, doc } from "firebase/firestore";
46
46
  import db from "../../config/firebase";
47
47
 
48
+ //usersコレクションより値を取得
48
49
  const Test = () => {
49
50
  const onClickSelect = async () => {
50
51
  const docRef = doc(db, "users", "7hs6ApsWzOd6deqYGuNU");
51
- const docSnap = await getDoc(docRef);
52
+ const docSnap = await getDo
52
- console.log(docSnap);
53
53
  };
54
54
 
55
55
  return (