This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
howdy, so im trying to make a game, and i want to basically have it where the account is associated with the firestore document. so that i can have it loaded in when the user loads in. also, how would i make it update the doc everytime the variable value increases, instead of every reload?(i have my game values stored in local storage, and i have it look at the values, and make a doc based on those) thank you!
var locCountvalue = localStorage.getItem('locCount');
var xpCountvalue = localStorage.getItem('xpCount');
var goldenkeysvalue = localStorage.getItem('goldenKeys');
var levelvalue = localStorage.getItem('level');
var clickvalue = localStorage.getItem('click');
// try to push data
addDoc(ColRef, {
locCount: locCountvalue,
xpCount: xpCountvalue,
goldenkeys: goldenkeysvalue,
level: levelvalue,
click: clickvalue,
})
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Firebase/co...