Defaults in function parameters is a feature that simplified my code a lot. But there is one caveat that we need to be aware of! Let’s start with an example:Continue reading “Tip: Watch out for null in default params”
Lazy loading images with Intersection Observer
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”
Learning Path: Getting started with React
Not long ago I started learning React. I have more than 10 years of experience using JS and before React I was actively coding in first wave generation web frameworks (like knockoutJS) and starting to get a grasp on components architecture (but using KO components + web components). Today I am coding entirely in React (both at work and for personal projects) and it’s been great. I love the community, there are a lot of projects & learning resources and I also found React to be a fast way of creating web applications.
In this post I want to share some resources that helped me learn React and I hope they are useful for anyone starting out there.Continue reading “Learning Path: Getting started with React”
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”
Tip: list NPM scripts
NPM scripts are super popular these days and they are usually the main way of executing tasks in any JS repo. The challenge is that there is no standard and every project will have different options. In this quick-tip I will show you how to list scripts from the terminal.Continue reading “Tip: list NPM scripts”
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”
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.
I have read lots of them and some are still in my backlog but every-time I learned something new out of them.
Weekly Digest #5: 100 days of code
100 days of code was started by Alexander Kallaway in 2016 but recently it has been gaining more momentum (we all know why). Practice is the only way to master any discipline so if you have been thinking about joining the challenge, I have compiled a list of project ideas to help you get started.Continue reading “Weekly Digest #5: 100 days of code”
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.
Weekly Digest #4: On React internals
This weekly digest focuses on React internals. Understanding how react works internally helps to follow best practices when coding, better understanding on performance and extra skills to debug those hard bugs. React defines that UI is a function of state:
UI = f(s) . Every time the state changes react calculates the new UI (reconciliation) and renders the differences:
Continue reading “Weekly Digest #4: On React internals”
Read the following sources to understand better how the whole process works: