React Hooks Tutorial for Beginners: Getting Started With React Hooks (2019)

In this React hooks tutorial you will learn how to use React hooks, what they are, and why we’re doing it.

React Hooks Tutorial for Beginners: Getting Started With React Hooks (2019)

Here I am, writing a React hooks tutorial for you. I decided to wait until hooks got finally released before dropping this post. Together we’ll learn React hooks step by step, with a look at how the same logic would be implemented with ES6 classes.

Enjoy the reading!

Continue reading “React Hooks Tutorial for Beginners: Getting Started With React Hooks (2019)”

How to Test a Django Application: the Thought Process Behind Testing

In the following tutorial you’ll learn how to test a Django application and the thought process behind testing and refactoring

How to Test a Django Application: the Thought Process Behind Testing

When it comes to backend my tools of choice are Django and Python. Speed of development (particulary useful for rapid prototyping) and the excellent test coverage I can get almost out of the box are the major boons for me.

I use Django for training aspiring developers too and when I run a workshop I don’t go straight to the “right implementation”. What I like instead is guiding newcomers through the initial “working implementation” to refactoring into a more complex application.

In this tutorial you’ll build a small application with the exact same mindset. We’ll make it work first and them we will refactor for adding more functionalities.

Continue reading “How to Test a Django Application: the Thought Process Behind Testing”

Automated testing and Continuous Integration in Drupal 8: an Introduction

Learn how to embrace automated testing and continuous integration in Drupal 8 projects

Automated testing and Continuous Integration in Drupal 8

Besides frontend consulting, part of my job consists in helping teams to embrace automated testing and continuous integration. These days I’m consulting with a Drupal shop in Italy, Whitedrop. Whitedrop is run by Giovanni and Federico. I met Giovanni at a Meetup in Arezzo last year and soon we became friend.

The team at Whitedrop were interested in knowing more about continuous integration and continuous delivery before taking on more challenging Drupal projects.

Continue reading “Automated testing and Continuous Integration in Drupal 8: an Introduction”

JavaScript: What Is The Execution Context? What Is The Call Stack?

What is the Execution Context in JavaScript?

Javascript: What Is The Execution Context? What Is The Call Stack?

I bet you don’t know the answer. What are the most basic components of a programming language?

UPDATE: There is an improved, extended version of this blog post: JavaScript Engines: How Do They Even Work? From Call Stack to Promise, (almost ) Everything You Need to Know

Variables and functions right? Everybody can learn these building blocks. But what lies beyond the basics?

What are the pillars of Javascript that you should master before calling yourself intermediate (or even senior) Javascript developer?

Continue reading “JavaScript: What Is The Execution Context? What Is The Call Stack?”

How To Use Async Await in React (componentDidMount Async)

How To Use Async Await in React?

How To Use Async Await in React (componentDidMount Async)

You want to use Async Await in React the same as you do in Node.JS? create-react-app supports async/await out of the box.

But if you work with your own webpack boilerplate you may hit an error like regeneratorRuntime is not defined. In the following post you’ll see how to use Async Await in React and how to fix that error.

Continue reading “How To Use Async Await in React (componentDidMount Async)”

How to Throw Errors From Async Functions in Javascript? (and how to test them)

It is possible to throw errors from async functions in Javascript? The topic has been covered hundred of times but let’s see it from a TDD standpoint.

Answer the question without looking at Stackoverflow. If you know the answer, well I’m impressed. If not that’s cool too. Keep reading and you’ll find it!

How to Throw Errors From Async Functions in Javascript? (and how to test them)
Continue reading “How to Throw Errors From Async Functions in Javascript? (and how to test them)”

Webpack 4 Tutorial: from 0 Conf to Production Mode

webpack 4 is out!

The popular module bundler gets a massive update.

webpack 4, what’s new? A massive performance improvement, zero configuration and sane defaults.

webpack 4 logo

This is a living, breathing introduction to webpack 4. Constantly updated.

You’ll build a working webpack 4 environment by following each section in order.

But feel free to jump over the tutorial!

Continue reading “Webpack 4 Tutorial: from 0 Conf to Production Mode”