I started building out the wellbeing/self development app and I started doing layouts and components and... I had to stop. I was complicating things too much for a prototype. Always do the following: 1. Make something that works 2. Make it better 3. Make it faster If you start with something very complicated you can loose yourself in the details. Also, crypto can be added later on. Still thinking about what would be the token be called: enlightenment? light? grow? growth?, ... #cryptocurrency #cryptotrading #wellbeingapp #randomthoughts
Log in to join in Reading is open to everyone. Replying needs an account.
5 comments
Do you have some tips on async / await? I've been struggling with it especially with regard to Postgres / express calls on heroku. I also have some delay issues with HTML and have tried using jquery but still running into a problem with data that hasn't arrived from an api call / or PUT express calls to server not being completed, etc.
Well, one of the uses of async/await is for consumer based api, like doing something in a database (updating a record or something). The reason is that from the frontend doing an api of that sort could block the main thread so async will free the thread. A sort of "Hey Await Function! Do that and when come back at some point, just let me know about the result. I will do some other stuff in the mean time". For the html you will need to prepare your html for the following 3 situations: - Data is not available. (e.g: Whenever you call the api. Usually spinners, "loading ..." and similar will be used here) - APi returned an error ( sometimes triggers the opening of a modal, or an dismissible alert) - The actual new data (put the data where it should) Check the MDN, it's actually very good and well explained: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function
Thanks, I will read it. It's kinda my 'stumped' point right now, so I work around it until I can figure something out. Another issue I see is with heroku (I don't know if limitation on the account I have) sending 1-2 postgres calls via express leads to one being ignored, even if I think I put them in sequential order. Wondering if a setTimeout would resolve this, but then again that adds delays I don't ordinarily see in games..
Hmmm seems odd. Are you chaining promises?
I only use 'async function(){ } ' and await on variables sometimes. I have trouble grasping promises, promises all etc.