6th week of 2021
Highlights of the week.
Table of contents
Last year I implemented server-side rendering (SSR) to our team's React Single Page Apps. SSR is apparently a rarity in our company (so far), so I was asked to give a 30-minute presentation on the topic to a group of about ten other developers. I covered:
- What SSR is
- Benefits and drawbacks of SSR
- How to implement SSR (general steps)
- Lessons learned and tips from my last year's implementation.
I'm very happy that I managed to stay chill during the presentation. Had I given the same presentation a year or two earlier, I would have been very nervous. Guess I have grown in that sense.
Plus I'm happy that I got another good topic for a new blog post.
I got email from Victor Ofoegbu, who had found my weekly log via Stefan Judis's web dev newsletter. Victor recently started writing weekly notes as well, and I got mentioned in Victor's Weekly Notes 001:
It's nice to know that my humble weekly notes have inspired someone. And I was very delighted to receive an email from an internet stranger.
So, dear reader: if you send me an email to email@example.com, you'll make me happy!
Then go check out Victor's weekly notes. 🙂
I had to look up what MDN says about closures:
A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function's scope from an inner function.
After reading that, answering the question was easy.
Dmitri says it maybe more clearly in the answer section:
A simple rule to identifying a closure is checking whether the function accesses variables from the outer scopes.
Self-defense: I got the other six questions right without having to look up any more info, so I'd say I know my closures. It was just the definition of closures that I had trouble with. 😜
Change "github.com" to "github1s.com" to open a GitHub repo in VS Code (in the browser). Example using my website repo:
Why this is cool:
- Provides a handy, easy and familiar way to browse the files of a repo.
- Opens very quickly (in ~1 second 🙂).
See github1s on GitHub. Found via Hacker News.