Using WebRTC and React to build a basic chat server

Tags:

In this article, we’re going to look at how to use WebRTC to relay chat messages between browsers in a React application. Last time we learned how to store and handle data in a React app. If you’ve just looking to learn about React and WebRTC, you should be able to follow this without reading the previous entries in the …

Learn to unit test your javaScript code with Mocha and Chai

Tags:

Have you ever made some changes to your code, and later found it caused something else to break? I’m sure most of us have. This is almost inevitable, especially when you have a larger amount of code. One thing depends on another, and then changing it breaks something else as a result. But what if that didn’t happen? What if …

Getting started with npm and Browserify in a React project

Tags:

This is the second article in a series where we build a Slack-style chat app with React. So far, in the previous article, we’ve built a simple prototype. We want to start adding features to it – such as actually supporting multiple people chatting – but before we do that, let’s set up some tools. npm and Browserify are useful …

Learning React basics and building a basic application prototype

Tags:

This is the first part in a series of articles, where we’ll be using React to build a Slack-style chat application. In this article, we’ll start by building a basic prototype. We’ll start by learning about React components and JSX. While doing that, we’ll also look at the basics of building React applications.

Getting started with React the easy way

Tags:

There’s a lot of talk lately about how it’s hard to get started with JavaScript libraries like React. You need ES6, you need Babel, you need this, you need that. If all you want is to try a library, there’s tons of technobabble getting in your way, sometimes involving so many steps it’s easier to just go and do something …

Sinon.js best practices for spies, stubs and mocks

Tags:

Sinon is one of the most important tools for testing, as without it writing tests for more complex pieces of code such as Ajax, networking, databases, etc. would become difficult. In this article, I’ll show you the best practices for using Sinon, so you’ll be able to apply it to your own projects more easily. What are the differences between …