📜  存储和接收 FB - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:33.303000             🧑  作者: Mango

代码示例1
import { getDatabase, ref, onValue } from 'firebase/database';

function storeHighScore(userId, score) {
  const db = getDatabase();
  const reference = ref(db, 'users/' + userId);
  set(ref(db, 'users/' + userId), {
    highscore: score,
  });
}