What’s all the hype about React Server Components?

A couple of weeks ago the React team announced React Server Components. In this article today I will explain what it is, why they came up with this strategy and how to get prepared for it.

Continue reading “What’s all the hype about React Server Components?”

Lazy loading images with Intersection Observer

Images play a huge role in loading performance. Websites loading tons of images upfront can be paying a high price in terms of user experience. Based on google’s research 53% of mobile users abandon a site if it does not load in 3 seconds.

To avoid this issue, I am going to show you how to implement lazy loading in only a few lines of code!

Continue reading “Lazy loading images with Intersection Observer”

Weekly Digest #10: On Remix, Snowpack, Rome and Web-vitals

The never ending flow of innovation is what I love about the web. There are so many great ideas! In the past few months a lot of innovation happened and in this weekly digest I want to share all those new projects that I am tracking. 

Continue reading “Weekly Digest #10: On Remix, Snowpack, Rome and Web-vitals”

Weekly Digest #9: Everything you need to know about Deno

TL;DR: Deno is a new ECMAScript based runtime (like NodeJS) created by Ryan Dahl (who also created NodeJS). It brings a lot of improvements to nodeJS: secure by default, TS default support and built-in utilities (dependency inspector, code formatting, bundler, etc).

Deno 1.0 was recently released and today I will give you all the resources you need to get yourself started.

Continue reading “Weekly Digest #9: Everything you need to know about Deno”

Weekly Digest #8: On building games

It has been always in the back of my head to develop some games. A while back I developed an android game called Drink or Dare with some friends, but that’s about it.

Today, I want to share a list of resources I have been bookmarking to help me develop games.

Continue reading “Weekly Digest #8: On building games”

Weekly Digest #7: On Javascript books

Whether you are learning JS from scratch or have been working with it for a while now, I believe you will find great value on the following list of books.

js-books

I have read lots of them and some are still in my backlog but every-time I learned something new out of them.

Here is the list:

Continue reading “Weekly Digest #7: On Javascript books”

Thoughts on Snapshot Testing

Since I moved to react at work I have been using and trying different testing strategies and I wanted to share some thoughts and best practices around snapshot testing.

In the past I have worked on different projects on frontend, from simple websites to complex editors. Along the journey I have used different testing frameworks and tools.

While recently snapshot testing has become popular, in my opinion it can be a double edged sword, and here is why.

Continue reading “Thoughts on Snapshot Testing”

Weekly Digest #1

  • Best practices on JavaScript modularity: when to use named exports, how to group code and what to avoid. Check JavaScript Module Best Practices.
  • Understanding the proxy pattern and adding that to your toolbox is super useful. In the past I have used proxies for multiple purposes (logging, performance, caching results). Learn more about JavaScript proxy in JavaScript Proxy Object Explained post.
  • Have you read “JavaScript: the good parts”? Check this article on The Magic Behind JavaScript Sintaxis Shortcuts to learn more about not so good practices (well except maybe ternary operator)
  • Planning to try all this out? Check this article on best online IDEs: 12+ Best Online Code Editors for Web Developers. I recommend Stack blitz (it is vs code online)
  • Let’s finish with some js basics. Here’s an article that quickly explains how to declare variables: JavaScript Variables: var and let and const. I tend to agree with the statements made in the article, const is your ally but there is one caveat that you need to understand. A value declared in a const cannot be mutated, but objects or arrays are always mutable constructs, so while you can declare an object or an array as a const it is possible to mutate its properties/items. It only won’t be posible to assign something else to that const!

Enjoy!!!