Skip to content
Advertisement

Tag: async-await

NodeJs push in array not working within the async function

Here is my code… When I’m trying to access schedule.passenger inside the async function It’s working but when trying to access outside the async function it’s not working. Answer forEach(async function will fire bunch of async functions and once array iterations are complete, the execution will move to next code block without waiting for all the async functions to complete.

firebase.auth().currentUser is null at page load

I successfully check the user’s authentication state with onAuthStateChange observer and redirect the user to the profile page. However, I already want to show some user-specific data on the profile, (e.g. description). For that, I need the currentUser object to be initialized and populated, which takes some time (I need uid from there to get some data from firestore). Thus,

How to render something that is async in React?

I’m making a react app that works with a API that provides data to my App. In my data base I have data about pins on a map. I want to show the info of those pins on my react app, I want them to render. I get that information with axios and this url: http://warm-hamlet-63390.herokuapp.com/pin/list I want to retrieve

Advertisement