What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-26 19:32:06
joining multiple documents in cloud firestore
let loadedPosts = {}; posts = db.collection('posts') .orderBy('timestamp', 'desc') .limit(3); posts.get() .then((docSnaps) => { docSnaps.forEach((doc) => { loadedPosts[doc.id] = doc.data(); db.collection('users').child(... Add solution -
Other 2021-09-26 11:39:04
expo location background example
import * as Location from 'expo-location'; import * as TaskManager from 'expo-task-manager'; import axios from 'axios'; const TASK_FETCH_LOCATION = 'TASK_FETCH_LOCATION'; // 1 define the task passing its name and a callback that will be called whenever ... Add solution -
Javascript 2021-09-26 08:45:02
build a weather app javascript
// Full tutorial: https://www.youtube.com/watch?v=WZNG8UomjSI fetch( "https://api.openweathermap.org/data/2.5/weather?q=" + city + "&units=metric&appid=" + apiKey ) .then((response) => response.json()) .th... Add solution -
Javascript 2021-09-26 08:10:05
ejemplo async await javascript
// Async/Await const asyncGreeting = async () => 'Greetings'; // Promises const promiseGreeting = () => new Promise(((resolve) => { resolve('Greetings'); })); asyncGreeting().then(result => console.log(result)); promiseGreeting().then(result... Add solution -
TypeScript 2021-09-25 07:52:03
cloudinary
import { v2 as cloudinary, UploadApiResponse } from 'cloudinary' export const cloudStorage = (filename: string): Promise<Record<string, any>> => { return new Promise((resolve, reject) => { cloudinary.config({ cloud_name: process.e... Add solution