This is a quick little tip about sharing local variables across functions in your React components. It's something that a fellow developer, Ben, reminded me of in a pair programming session recently so I decided to write a blog post about it!
I've recently been building web applications with front-end frameworks like React, Reagent, and Angular 2. I was recently working on an Angualr 2 project and thought, "man, this sure seems like a ton of lines of code", but had no concrete evidence to prove it. After a quick google search I came to this stack overflow question, and the awesome answer(s) therein.
Ah git. Git is powerfully ferocious utility for version control of the code for a software project, but you must tame the beastly demon of experience by coming to sumbling blocks, getting through them, and documenting how you did it. So, let's do it...
Yep, this blog post is the result of yet another great discovery by yours truly! After making a few AWS Lambda services that automate Twitter activity I realized that I needed to deploy the same function many times, each as a scheduled event in AWS but with slightly different configurations (such as twitter access keys for the desired account, keywords for posts to like, etc). I wanted to keep the same core codebase of logic for each type of lambda function but somehow deploy multiple versions of it, and I wanted to be able to upload the code in one place and have all the places where it's used be updated without having to deploy to each one individually. Here's how I managed to do it!
The posts on this site are written and maintained by Jim Lynch. About Jim...