firebase cheat sheet
JavaScript
Firebase CDN
links:
https://www.gstatic.com/firebasejs/7.14.0/firebase-app.js
https://www.gstatic.com/firebasejs/7.14.0/firebase-auth.js
https://www.gstatic.com/firebasejs/7.14.0/firebase-firestore.js
https://www.gstatic.com/firebasejs/7.14.0/firebase-analytics.js
// Authentication with Email
const auth = fireabase.auth()
auth.createUserWithEmailAndPassword(email, password).then(cred => {
console.log(cred);
});
auth.signOut().then(() => console.log('user signed out));
auth.signInWithEmailAndPassword(email, password).then(cred => {
console.log(cred);
})
auth.onAuthStateChanged(user => {
// fired when login, sign in or logout
// and if user if null then user is not logged in..
}
// Firestore
const db = firebase.firestore();
db.collection('collection_name').get().then(snapshots => {
console.log(snapshots.docs);
});
db.collection('collection_name').add(fields here...).then(() => {
console.log('data added...');
});
//this onShapshot allow us to set real-time listener to our database if theirs change in the database it will give us new data...
db.collection('collection_name').onSnapshot(snapshots => {
console.log(snapshots.docs)
});
Also in JavaScript:
- Title
- how to update kali linux on virtualbox
- Category
- JavaScript
- Title
- javascrip check if string contains substring
- Category
- JavaScript
- Title
- angular lifecycle hooks
- Category
- JavaScript
- Title
- function clear() p5js how das this work
- Category
- JavaScript
- Title
- datatables server side
- Category
- JavaScript
- Title
- gql TypeError: Object(...) is not a function
- Category
- JavaScript
- Title
- array push javascript example
- Category
- JavaScript
- Title
- angular flex layout
- Category
- JavaScript
- Title
- call javascript function from html
- Category
- JavaScript
- Title
- HTML5 Accesskey Attribute: you may not need JavaScript to add Keyboard Shortcuts
- Category
- JavaScript
- Title
- how to add object to array javascript
- Category
- JavaScript
- Title
- Javascript change element class
- Category
- JavaScript
- Title
- getelementbyid
- Category
- JavaScript
- Title
- how to add role in discord.js v12
- Category
- JavaScript
- Title
- fetch multiple urls javascript
- Category
- JavaScript
- Title
- .shift js
- Category
- JavaScript
- Title
- dropdown list value react fragment
- Category
- JavaScript
- Title
- get value javascript
- Category
- JavaScript
- Title
- ajax with progress bar
- Category
- JavaScript
- Title
- console log all array values node
- Category
- JavaScript
- Title
- document delete element
- Category
- JavaScript
- Title
- get url of page in background script
- Category
- JavaScript
- Title
- electron Uncaught ReferenceError: require is not defined at recorder.js:1
- Category
- JavaScript
- Title
- flip a coin javascript
- Category
- JavaScript
- Title
- add item to list javascript
- Category
- JavaScript
- Title
- extend react.component
- Category
- JavaScript
- Title
- inline javascript html
- Category
- JavaScript
- Title
- how to validate input type=date in javascript
- Category
- JavaScript
- Title
- dot geometru three js
- Category
- JavaScript
- Title
- angular list contains property
- Category
- JavaScript
- Title
- how to use a fixed time zone in nodejs
- Category
- JavaScript
- Title
- default pool size in sequelize
- Category
- JavaScript
- Title
- filter array objects javascript
- Category
- JavaScript
- Title
- checked unchecked through js
- Category
- JavaScript
- Title
- how to move a block in javascript
- Category
- JavaScript
- Title
- adding delay in javascript foreach loop
- Category
- JavaScript
- Title
- adding cors parameters to extjs ajax
- Category
- JavaScript
- Title
- html external javascript
- Category
- JavaScript
- Title
- detect a click outside an element javascript
- Category
- JavaScript
- Title
- async await javascript stack overflow
- Category
- JavaScript
- Title
- bootstrap 4 open tab when opening modal
- Category
- JavaScript
- Title
- how to limit input type max length
- Category
- JavaScript
- Title
- ajax laravel example
- Category
- JavaScript
- Title
- define a route with path paramters in nodejs
- Category
- JavaScript
- Title
- javascript Check if an element is a descendant of another
- Category
- JavaScript
- Title
- arrow function javascript ie11
- Category
- JavaScript
- Title
- concat js mdn
- Category
- JavaScript
- Title
- ajax .put
- Category
- JavaScript
- Title
- expresiones ternarias javascript
- Category
- JavaScript
- Title
- erela client userID
- Category
- JavaScript
- Title
- angular trigger input change
- Category
- JavaScript
- Title
- console trace js
- Category
- JavaScript
- Title
- brute force search javascript
- Category
- JavaScript
- Title
- how to print a array js
- Category
- JavaScript
- Title
- how to return the number of nodes in a linked list
- Category
- JavaScript
- Title
- ajax open a request
- Category
- JavaScript
- Title
- how to remove attrivusre with jquery
- Category
- JavaScript
- Title
- how to loop object javascript
- Category
- JavaScript
- Title
- javascript append to object
- Category
- JavaScript
- Title
- for of array javascript
- Category
- JavaScript
- Title
- for(let [key,val] in obj){ messageBody = messageBody.replace("{"+ key + "}",val) }
- Category
- JavaScript
- Title
- iterate through array javascript
- Category
- JavaScript
- Title
- add firebase in react
- Category
- JavaScript
- Title
- html loop through array
- Category
- JavaScript
- Title
- body-parser node
- Category
- JavaScript
- Title
- deny ready jquery
- Category
- JavaScript
- Title
- autocomplete typeahead ajax
- Category
- JavaScript
- Title
- anguler test submit form
- Category
- JavaScript
- Title
- cant find variable react
- Category
- JavaScript
- Title
- form validation in reactstrap
- Category
- JavaScript
- Title
- filereader javascript example
- Category
- JavaScript
- Title
- angular add debounce time before putting valu in subject next
- Category
- JavaScript
- Title
- how to use custom stylesheets express node
- Category
- JavaScript
- Title
- client side redirect javascript
- Category
- JavaScript
- Title
- angular submit form programmatically
- Category
- JavaScript
- Title
- error duplicate resources react native
- Category
- JavaScript
- Title
- array.filter in js
- Category
- JavaScript
- Title
- injected stylesheet remove
- Category
- JavaScript
- Title
- for of loop syntax javascript
- Category
- JavaScript
- Title
- array data structure javascipt interview questions
- Category
- JavaScript
- Title
- abstraction in javascript
- Category
- JavaScript
- Title
- append new element for each value in array d3.js
- Category
- JavaScript
- Title
- how to delay redirect in javascript
- Category
- JavaScript
- Title
- interceptor in angular 8
- Category
- JavaScript
- Title
- capire che giorno della settimana è javascript
- Category
- JavaScript
- Title
- how to write a program that displays a message “It’s Fun day” if it's Saturday or Sunday today in javascript
- Category
- JavaScript
- Title
- javascript bubleshort example
- Category
- JavaScript
- Title
- http interceptor angular
- Category
- JavaScript
- Title
- javascript addeventlistener
- Category
- JavaScript
- Title
- get x, y of element js
- Category
- JavaScript
- Title
- how to check if 2 images are touching js
- Category
- JavaScript
- Title
- how to get width of inline elements js
- Category
- JavaScript
- Title
- javascript check if string contains character
- Category
- JavaScript
- Title
- how to clone an object in javascript
- Category
- JavaScript
- Title
- append data array javascript
- Category
- JavaScript
- Title
- fetch post js
- Category
- JavaScript
- Title
- javascript array with objects to string
- Category
- JavaScript
- Title
- javascript ajax request
- Category
- JavaScript
- Title
- angular run with proxy
- Category
- JavaScript
- Title
- javascript array push object
- Category
- JavaScript