Hey all! I’m taking a break from writing my Finance App blog posts to write some fundamental blog posts. These will serve as references that I can point to from my Finance App posts, and any other future tutorials. Thanks to my good friend, Devonta for giving me a much better strategy when writing blog posts.
In trying to learn as much about the C# environment as I can, I decided to write about something almost everyone in the community is aware of.
This article will also be featured in the handy React guide, i can not react. Check them out if you like the article for more React related posts!
tldr; Start with a Function component, leveraging the new React Hooks API introduced in 16.8 . As of November 2nd 2018 Dan Abramov, one of the maintainers of React, advised that this is the way to write React components from here on.
We have overcome If you remember my last post, I was having trouble with Promises. I didn’t know it at the time, but I was struggling with structuring my code to fully leverage the chaining power of Promises.
So with my new findings I’ll explain the same GET request, now fully powered by promises!
Environment We are running a pretty bare bones Express.js server, with bodyParser We also swapped out mysql with promise-mysql for better compatability with Typescript.
Promises have their own kind of hell. And it’s almost as crazy as callback hell. Writing DAO and Manager layers in Node.js with promises has been some adventure. I’m going to talk through a simple get request for some photos with tags and demonstrate my process and pain points. Hopefully any reader (or myself) in the future can smack me in the face and say
You dope! Just do [fill in better solution here]
Oh, hey. I’m doing this again. So, as you may notice, my blog got a revamp. I think my previous design was more of a POC and fun experiment than for practicality. So, I moved to hugo. They let me blog in Markdown which is awesome :sunglasses:
Wait, but we don’t care. I do. So fuck off.
Wow, kinda passive agressive don’t you think? …
What does this mean? Im gonna try to post more than ever.