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...
I had passed the phone screen for a chance to work as a ClojureScript developer for a startup in manhattan, and they emailed me a coding challenge. Basically, they wanted me to make a glorified do-to list using reagent and re-frame. This post is to document the feedback from the reviewer of my code and think out loud about what he / she meant by it and what I can do to avoid the same issues the future.
When I'm designing a web application that I want to be responsive, I frequently use the units vh and vw (which stand for viewport height and viewport width). These are great because they allow you to size things based on a percentage of the viewport height. However, sometimes you want things sized at 100% of the height or width minus a constant, and that's where the calc function comes in handy!
The posts on this site are written and maintained by Jim Lynch. About Jim...