Testing React Components: The Mostly Definitive Guide (ft. react-test-renderer)

A living, breathing guide to testing React components. Constantly updated, better you bookmark it!

Test-Driven React: The Mostly Definitive Guide to Testing React

Web development is fantastic! You know HTML, CSS, JavaScript, and React!

You’re ready to build fantastic web applications people will use and love!

It sounds like a dream … until you land your first job as a front-end developer.

I don’t want to scare you but imagine this.

Continue reading “Testing React Components: The Mostly Definitive Guide (ft. react-test-renderer)”

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?

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

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 regeneratorRuntime is not defined.

If you’re hitting that error and you want to use Async Await in React, look no further.

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?

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

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!

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”

Django: How to Fix “missing 1 required positional argument: on_delete”

A quick fix for missing 1 required positional argument: on_delete on Django 2.0

Django 2.0: a quick fix for "missing 1 required positional argument: on_delete"

Django 2.0 has been released with some nice improvements over the older version.

I really like the new path method so I decided to check out Django 2.0. Among the new feature there are some minor changes such as with the ForeignKey field.

Continue reading “Django: How to Fix “missing 1 required positional argument: on_delete””